ObjFW  Diff

Differences From Artifact [5cb71bfab3]:

To Artifact [02231d7620]:


35
36
37
38
39
40
41


42
43
44
45


46
47






























48
49
50
51
52
53
54
 * To create a server, create a socket, bind it and listen on it.
 */
@interface OFTCPSocket: OFStreamSocket
{
	BOOL			listening;
	struct sockaddr_storage	*sockAddr;
	socklen_t		sockAddrLen;


}

#ifdef OF_HAVE_PROPERTIES
@property (assign, readonly, getter=isListening) BOOL listening;


#endif































/**
 * \brief Connect the OFTCPSocket to the specified destination.
 *
 * \param host The host to connect to
 * \param port The port on the host to connect to
 */
- (void)connectToHost: (OFString*)host







>
>




>
>


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







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
 * To create a server, create a socket, bind it and listen on it.
 */
@interface OFTCPSocket: OFStreamSocket
{
	BOOL			listening;
	struct sockaddr_storage	*sockAddr;
	socklen_t		sockAddrLen;
	OFString		*SOCKS5Host;
	uint16_t		SOCKS5Port;
}

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

/**
 * \brief Sets the host to use as a SOCKS5 proxy.
 *
 * \param host The host to use as a SOCKS5 proxy
 */
- (void)setSOCKS5Host: (OFString*)host;

/**
 * \brief Returns the host to use as a SOCKS5 proxy.
 *
 * \return The host to use as a SOCKS5 proxy
 */
- (OFString*)SOCKS5Host;

/**
 * \brief Sets the port to use on the SOCKS5 proxy.
 *
 * The default port is 1080.
 *
 * \param port The port to use on the SOCKS5 proxy
 */
- (void)setSOCKS5Port: (uint16_t)port;

/**
 * \brief Returns the port to use on the SOCKS5 proxy.
 *
 * \return The port to use on the SOCKS5 proxy
 */
- (uint16_t)SOCKS5Port;

/**
 * \brief Connect the OFTCPSocket to the specified destination.
 *
 * \param host The host to connect to
 * \param port The port on the host to connect to
 */
- (void)connectToHost: (OFString*)host