Differences From Artifact [a7e950a736]:
- File src/OFStreamSocket.m — part of check-in [e40729d406] at 2013-02-12 18:22:15 on branch trunk — Prefix all ivars with an underscore. (user: js, size: 3493) [annotate] [blame] [check-ins using]
To Artifact [9ccd3888ba]:
- File
src/OFStreamSocket.m
— part of check-in
[c5ef582958]
at
2013-03-04 17:20:15
on branch trunk
— Replace BOOL with bool.
The only places where BOOL is left are those where they are required by
the ABI. (user: js, size: 3497) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
61 62 63 64 65 66 67 | #endif + (instancetype)socket { return [[[self alloc] init] autorelease]; } | | | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | #endif + (instancetype)socket { return [[[self alloc] init] autorelease]; } - (bool)lowlevelIsAtEndOfStream { return _atEndOfStream; } - (size_t)lowlevelReadIntoBuffer: (void*)buffer length: (size_t)length { |
︙ | ︙ | |||
96 97 98 99 100 101 102 | if ((ret = recv(_socket, buffer, length, 0)) < 0) @throw [OFReadFailedException exceptionWithClass: [self class] stream: self requestedLength: length]; if (ret == 0) | | | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | if ((ret = recv(_socket, buffer, length, 0)) < 0) @throw [OFReadFailedException exceptionWithClass: [self class] stream: self requestedLength: length]; if (ret == 0) _atEndOfStream = true; return ret; } - (void)lowlevelWriteBuffer: (const void*)buffer length: (size_t)length { |
︙ | ︙ | |||
130 131 132 133 134 135 136 | if (send(_socket, buffer, length, 0) < length) @throw [OFWriteFailedException exceptionWithClass: [self class] stream: self requestedLength: length]; } #ifdef _WIN32 | | | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | if (send(_socket, buffer, length, 0) < length) @throw [OFWriteFailedException exceptionWithClass: [self class] stream: self requestedLength: length]; } #ifdef _WIN32 - (void)setBlocking: (bool)enable { u_long v = enable; _blocking = enable; if (ioctlsocket(_socket, FIONBIO, &v) == SOCKET_ERROR) @throw [OFSetOptionFailedException exceptionWithClass: [self class] |
︙ | ︙ | |||
161 162 163 164 165 166 167 | if (_socket == INVALID_SOCKET) @throw [OFNotConnectedException exceptionWithClass: [self class] socket: self]; close(_socket); _socket = INVALID_SOCKET; | | | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | if (_socket == INVALID_SOCKET) @throw [OFNotConnectedException exceptionWithClass: [self class] socket: self]; close(_socket); _socket = INVALID_SOCKET; _atEndOfStream = false; } - (void)dealloc { if (_socket != INVALID_SOCKET) [self close]; [super dealloc]; } @end |