23OF_ASSUME_NONNULL_BEGIN
40 OF_DEPRECATED(ObjFW, 1, 2,
"Use OFTCPSocketConnecetedHandler instead");
52 OFString *host, uint16_t port,
id _Nullable exception);
60@protocol OFTCPSocketDelegate <OFStreamSocketDelegate>
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)
189- (
void)connectToHost: (
OFString *)host port: (uint16_t)port;
197- (
void)asyncConnectToHost: (
OFString *)host port: (uint16_t)port;
207- (
void)asyncConnectToHost: (
OFString *)host
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
OFConstantString * OFRunLoopMode
A mode for an OFRunLoop.
Definition OFRunLoop.h:46
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 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
id< OFTCPSocketDelegate > delegate
The delegate for asynchronous operations on the socket.
Definition OFTCPSocket.h:150
uint16_t SOCKS5Port
The port to use on the SOCKS5 proxy.
Definition OFTCPSocket.m:145
OFString * SOCKS5Host
The host to use as a SOCKS5 proxy.
Definition OFTCPSocket.m:135
A struct which represents a host / port pair for a socket.
Definition OFSocket.h:189