23 OF_ASSUME_NONNULL_BEGIN
40 OF_DEPRECATED(ObjFW, 1, 2,
"Use OFTCPSocketConnecetedHandler instead");
52 OFString *host, uint16_t port,
id _Nullable exception);
74 exception: (nullable
id)exception;
96 #ifdef OF_HAVE_CLASS_PROPERTIES
97 @property (
class, nullable, copy, nonatomic)
OFString *SOCKS5Host;
98 @property (
class, nonatomic) uint16_t SOCKS5Port;
101 #if !defined(OF_WII) && !defined(OF_NINTENDO_3DS)
110 @property (nonatomic)
bool sendsKeepAlives;
123 @property (nonatomic)
bool canDelaySendingSegments;
131 @property (nonatomic)
bool allowsMPTCP;
136 @property OF_NULLABLE_PROPERTY (copy, nonatomic)
OFString *SOCKS5Host;
141 @property (nonatomic) uint16_t SOCKS5Port;
149 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
158 + (
void)setSOCKS5Host: (nullable
OFString *)SOCKS5Host;
172 + (
void)setSOCKS5Port: (uint16_t)SOCKS5Port;
179 + (uint16_t)SOCKS5Port;
189 - (
void)connectToHost: (
OFString *)host port: (uint16_t)port;
197 - (
void)asyncConnectToHost: (
OFString *)host port: (uint16_t)port;
207 - (
void)asyncConnectToHost: (
OFString *)host
211 #ifdef OF_HAVE_BLOCKS
221 - (void)asyncConnectToHost: (
OFString *)host
224 OF_DEPRECATED(ObjFW, 1, 2,
225 "Use -[asyncConnectToHost:port:handler:] instead");
234 - (void)asyncConnectToHost: (
OFString *)host
249 - (void)asyncConnectToHost: (
OFString *)host
253 OF_DEPRECATED(ObjFW, 1, 2,
254 "Use -[asyncConnectToHost:port:runLoopMode:handler:] instead");
265 - (void)asyncConnectToHost: (
OFString *)host
285 OF_ASSUME_NONNULL_END
void(^ OFTCPSocketAsyncConnectBlock)(id exception)
A block which is called when the socket connected.
Definition: OFTCPSocket.h:39
void(^ OFTCPSocketConnectedHandler)(OFTCPSocket *socket, OFString *host, uint16_t port, id exception)
A handler which is called when the socket connected.
Definition: OFTCPSocket.h:51
A class for storing constant strings using the @"" literal.
Definition: OFConstantString.h:42
A class which provides methods to create and use stream sockets.
Definition: OFStreamSocket.h:88
A class for handling strings.
Definition: OFString.h:143
A class which provides methods to create and use TCP sockets.
Definition: OFTCPSocket.h:86
Definition: OFStreamSocket.h:64
Definition: OFTCPSocket.h:60
A struct which represents a host / port pair for a socket.
Definition: OFSocket.h:189