ObjFW  Diff

Differences From Artifact [2a976521af]:

To Artifact [98f00d6f79]:


32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
 * \brief A class which provides functions to create and use TCP sockets.
 *
 * To connect to a server, create a socket and connect it.
 * To create a server, create a socket, bind it and listen on it.
 */
@interface OFTCPSocket: OFStreamSocket
{
	BOOL		listening;
	struct sockaddr	*sockAddr;
	socklen_t	sockAddrLen;
}

/**
 * Connect the OFTCPSocket to the specified destination.
 *







|







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
 * \brief A class which provides functions to create and use TCP sockets.
 *
 * To connect to a server, create a socket and connect it.
 * To create a server, create a socket, bind it and listen on it.
 */
@interface OFTCPSocket: OFStreamSocket
{
	BOOL		isListening;
	struct sockaddr	*sockAddr;
	socklen_t	sockAddrLen;
}

/**
 * Connect the OFTCPSocket to the specified destination.
 *
84
85
86
87
88
89
90
91
92
93





94
 * Enable or disable keep alives for the connection.
 */
- (void)setKeepAlivesEnabled: (BOOL)enable;

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





@end







|


>
>
>
>
>

84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
 * Enable or disable keep alives for the connection.
 */
- (void)setKeepAlivesEnabled: (BOOL)enable;

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

/**
 * \return Whether the socket is a listening socket
 */
- (BOOL)isListening;
@end