Overview
Comment: | Abstract int vs SOCKET as of_socket_t |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
099e939079d6cdf3ed0deef7a37e6f02 |
User & Date: | js on 2015-03-22 11:42:08 |
Other Links: | manifest | tags |
Context
2015-03-30
| ||
21:32 | OFException: Fix missing #ifdef / #endif check-in: 4d16add5ae user: js tags: trunk | |
2015-03-22
| ||
11:42 | Abstract int vs SOCKET as of_socket_t check-in: 099e939079 user: js tags: trunk | |
10:10 | OFFile: Add methods for [ac]time, rename for mtime check-in: d6ab9e2c62 user: js tags: trunk | |
Changes
Modified src/OFHTTPClient.m from [24ccd00731] to [7ed76f14fb].
︙ | |||
223 224 225 226 227 228 229 230 231 232 233 234 235 236 | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | + + + | return [_socket isAtEndOfStream]; return _atEndOfStream; } - (int)fileDescriptorForReading { if (_socket == nil) return -1; return [_socket fileDescriptorForReading]; } - (bool)hasDataInReadBuffer { return ([super hasDataInReadBuffer] || [_socket hasDataInReadBuffer]); } |
︙ |
Modified src/OFHTTPServer.m from [5b74303c4d] to [5ac9f0f46d].
︙ | |||
277 278 279 280 281 282 283 | 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | - + | [_socket release]; _socket = nil; } - (int)fileDescriptorForWriting { if (_socket == nil) |
︙ |
Modified src/OFKernelEventObserver.h from [5fd1c2f371] to [2064104d5a].
︙ | |||
111 112 113 114 115 116 117 | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - + - + - - | OFMutableArray *_readObjects; OFMutableArray *_writeObjects; __unsafe_unretained id *_FDToObject; size_t _maxFD; OFMutableArray *_queue; OFDataArray *_queueInfo, *_queueFDs; id <OFKernelEventObserverDelegate> _delegate; |
︙ |
Modified src/OFStreamSocket.h from [fa0052c967] to [6843e4c621].
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - - + - - - - + | /*! * @class OFStreamSocket OFStreamSocket.h ObjFW/OFStreamSocket.h * * @brief A class which provides functions to create and use stream sockets. */ @interface OFStreamSocket: OFStream { |
Modified src/OFStreamSocket.m from [c547367b26] to [2a1777ff58].
︙ | |||
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | + + + + + + | #endif - (int)fileDescriptorForReading { #ifndef _WIN32 return _socket; #else if (_socket == INVALID_SOCKET) return -1; if (_socket > INT_MAX) @throw [OFOutOfRangeException exception]; return (int)_socket; #endif } - (int)fileDescriptorForWriting { #ifndef _WIN32 return _socket; #else if (_socket == INVALID_SOCKET) return -1; if (_socket > INT_MAX) @throw [OFOutOfRangeException exception]; return (int)_socket; #endif } |
︙ |
Modified src/OFUDPSocket.h from [efd1a5e773] to [40843cdaf1].
︙ | |||
83 84 85 86 87 88 89 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - - + - - - | * so context can be associated with a socket. Using a socket in more * than one thread at the same time is not thread-safe, even if copy * was called to create one "instance" for every thread! */ @interface OFUDPSocket: OFObject <OFCopying, OFReadyForReadingObserving, OFReadyForWritingObserving> { |
︙ |
Modified src/OFUDPSocket.m from [455c967f24] to [5a2d407327].
︙ | |||
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | + + + + + + | } - (int)fileDescriptorForReading { #ifndef _WIN32 return _socket; #else if (_socket == INVALID_SOCKET) return -1; if (_socket > INT_MAX) @throw [OFOutOfRangeException exception]; return (int)_socket; #endif } - (int)fileDescriptorForWriting { #ifndef _WIN32 return _socket; #else if (_socket == INVALID_SOCKET) return -1; if (_socket > INT_MAX) @throw [OFOutOfRangeException exception]; return (int)_socket; #endif } |
︙ |
Modified src/socket.h from [3d1ffffaa0] to [046f5f35a5].
︙ | |||
61 62 63 64 65 66 67 68 69 70 71 72 73 74 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | + + + + + + - + | uint8_t ss_len; sa_family_t ss_family; in_port_t ss_data1; struct in_addr ss_data2; int8_t ss_data3[8]; }; #endif #ifndef _WIN32 typedef int of_socket_t; #else typedef SOCKET of_socket_t; #endif #ifdef __cplusplus extern "C" { #endif extern bool of_socket_init(void); extern int of_socket_errno(void); # ifndef __wii__ |
Modified src/socket.m from [a024642fe6] to [a318aca5b3].
︙ | |||
162 163 164 165 166 167 168 | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | - + | return 0; #endif } #ifndef __wii__ int |
︙ |