Differences From Artifact [3d379a0b72]:
- File
src/OFTCPSocket.h
— part of check-in
[2a27cf3000]
at
2016-01-03 00:41:26
on branch trunk
— Update copyright
While at it, also update the mail address. (user: js, size: 7239) [annotate] [blame] [check-ins using]
To Artifact [1b9fd13a4f]:
- File
src/OFTCPSocket.h
— part of check-in
[12b8a7552e]
at
2016-03-27 23:10:53
on branch trunk
— Add socket support for Nintendo 3DS
This removes the port registry that existed for the Wii and instead
tries binding to random ports in a loop until it succeeds or errno is
not EADDRINUSE. This is done for the Wii and Nintendo 3DS now.This also includes several other socket-related cleanups. (user: js, size: 7501) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
63 64 65 66 67 68 69 | bool _listening; struct sockaddr *_address; socklen_t _addressLength; OFString *_SOCKS5Host; uint16_t _SOCKS5Port; #ifdef OF_WII uint16_t _port; | < | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | bool _listening; struct sockaddr *_address; socklen_t _addressLength; OFString *_SOCKS5Host; uint16_t _SOCKS5Port; #ifdef OF_WII uint16_t _port; #endif } /*! * The host to use as a SOCKS5 proxy. */ @property OF_NULLABLE_PROPERTY (copy) OFString *SOCKS5Host; |
︙ | ︙ | |||
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | /*! * @brief Returns whether the socket is a listening socket. * * @return Whether the socket is a listening socket */ - (bool)isListening; /*! * @brief Enable or disable keep alive for the connection. * * @param enabled Whether to enable or disable keep alives for the connection */ - (void)setKeepAliveEnabled: (bool)enabled; /*! * @brief Returns whether keep alive is enabled for the connection. * * @return Whether keep alives are enabled for the connection */ - (bool)isKeepAliveEnabled; /*! * @brief Enable or disable TCP_NODELAY for the connection. * * @param enabled Whether to enable or disable TCP_NODELAY for the connection */ - (void)setTCPNoDelayEnabled: (bool)enabled; /*! * @brief Returns whether TCP_NODELAY is enabled for the connection. * * @return Whether TCP_NODELAY is enabled for the connection */ - (bool)isTCPNoDelayEnabled; @end #ifdef __cplusplus extern "C" { #endif extern Class _Nullable of_tls_socket_class; #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END | > > > > > > > > > > > > | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | /*! * @brief Returns whether the socket is a listening socket. * * @return Whether the socket is a listening socket */ - (bool)isListening; #if !defined(OF_WII) && !defined(OF_NINTENDO_3DS) /*! * @brief Enable or disable keep alive for the connection. * * @warning This is not available on the Wii or Nintendo 3DS! * * @param enabled Whether to enable or disable keep alives for the connection */ - (void)setKeepAliveEnabled: (bool)enabled; /*! * @brief Returns whether keep alive is enabled for the connection. * * @warning This is not available on the Wii or Nintendo 3DS! * * @return Whether keep alives are enabled for the connection */ - (bool)isKeepAliveEnabled; #endif #ifndef OF_WII /*! * @brief Enable or disable TCP_NODELAY for the connection. * * @warning This is not available on the Wii! * * @param enabled Whether to enable or disable TCP_NODELAY for the connection */ - (void)setTCPNoDelayEnabled: (bool)enabled; /*! * @brief Returns whether TCP_NODELAY is enabled for the connection. * * @warning This is not available on the Wii! * * @return Whether TCP_NODELAY is enabled for the connection */ - (bool)isTCPNoDelayEnabled; #endif @end #ifdef __cplusplus extern "C" { #endif extern Class _Nullable of_tls_socket_class; #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END |