Differences From Artifact [d2e763431e]:
- File
src/OFStreamSocket.m
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 3974) [annotate] [blame] [check-ins using]
To Artifact [c248fb563e]:
- File
src/OFStreamSocket.m
— part of check-in
[b4cd87cd81]
at
2017-05-21 23:57:34
on branch trunk
— Use closesocket() instead of close()
Previously, socket_helpers.h would just define close() to whatever is
needed to close a socket. However, this makes it possible to
accidentally call a socket-specific close on something that is not a
socket. Having to explicitly call closesocket() (and defining it to
close() on platforms where it's the same) prevents this. (user: js, size: 3980) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
165 166 167 168 169 170 171 | } - (void)close { if (_socket == INVALID_SOCKET) @throw [OFNotOpenException exceptionWithObject: self]; | | | 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | } - (void)close { if (_socket == INVALID_SOCKET) @throw [OFNotOpenException exceptionWithObject: self]; closesocket(_socket); _socket = INVALID_SOCKET; _atEndOfStream = false; [super close]; } |
︙ | ︙ |