ObjFW  Diff

Differences From Artifact [d128094129]:

To Artifact [0e29d56685]:


65
66
67
68
69
70
71


72
73
74
75
76
77
78
	uint16_t _SOCKS5Port;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly, getter=isListening) bool listening;
@property (copy) OFString *SOCKS5Host;
@property uint16_t SOCKS5Port;


#endif

/*!
 * @brief Sets the global SOCKS5 proxy host to use when creating a new socket
 *
 * @param SOCKS5Host The host to use as a SOCKS5 proxy when creating a new
 *		     socket







>
>







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
	uint16_t _SOCKS5Port;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly, getter=isListening) bool listening;
@property (copy) OFString *SOCKS5Host;
@property uint16_t SOCKS5Port;
@property (getter=isKeepAliveEnabled) bool keepAliveEnabled;
@property (getter=isTCPNoDelayEnabled) bool TCPNoDelayEnabled;
#endif

/*!
 * @brief Sets the global SOCKS5 proxy host to use when creating a new socket
 *
 * @param SOCKS5Host The host to use as a SOCKS5 proxy when creating a new
 *		     socket
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
 * @param block The block to execute when a new connection has been accepted.
 *		Returns whether the next incoming connection should be accepted
 *		by the specified block as well.
 */
- (void)asyncAcceptWithBlock: (of_tcp_socket_async_accept_block_t)block;
#endif

/*!
 * @brief Enable or disable keep alives for the connection.
 *
 * @param enable Whether to enable or disable keep alives for the connection
 */
- (void)setKeepAlivesEnabled: (bool)enable;

/*!
 * @brief Returns the remote address of the socket.
 *
 * Only works with accepted sockets!
 *
 * @return The remote address as a string
 */
- (OFString*)remoteAddress;

/*!
 * @brief Returns whether the socket is a listening socket.
 *
 * @return Whether the socket is a listening socket
 */
- (bool)isListening;




























@end

#ifdef __cplusplus
extern "C" {
#endif
extern Class of_tls_socket_class;
#ifdef __cplusplus
}
#endif







<
<
<
<
<
<
<















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>









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
273
274
275
276
277
278
279
280
281
 * @param block The block to execute when a new connection has been accepted.
 *		Returns whether the next incoming connection should be accepted
 *		by the specified block as well.
 */
- (void)asyncAcceptWithBlock: (of_tcp_socket_async_accept_block_t)block;
#endif








/*!
 * @brief Returns the remote address of the socket.
 *
 * Only works with accepted sockets!
 *
 * @return The remote address as a string
 */
- (OFString*)remoteAddress;

/*!
 * @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 of_tls_socket_class;
#ifdef __cplusplus
}
#endif