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;
95#ifdef OF_HAVE_CLASS_PROPERTIES
96@property (
class, nullable, copy, nonatomic)
OFString *SOCKS5Host;
97@property (
class, nonatomic) uint16_t SOCKS5Port;
100#if !defined(OF_WII) && !defined(OF_NINTENDO_3DS)
109@property (nonatomic)
bool sendsKeepAlives;
122@property (nonatomic)
bool canDelaySendingSegments;
128@property OF_NULLABLE_PROPERTY (copy, nonatomic)
OFString *SOCKS5Host;
133@property (nonatomic) uint16_t SOCKS5Port;
141@property OF_NULLABLE_PROPERTY (assign, nonatomic)
181- (
void)connectToHost: (
OFString *)host port: (uint16_t)port;
189- (
void)asyncConnectToHost: (
OFString *)host port: (uint16_t)port;
199- (
void)asyncConnectToHost: (
OFString *)host
213- (void)asyncConnectToHost: (
OFString *)host
216 OF_DEPRECATED(ObjFW, 1, 2,
217 "Use -[asyncConnectToHost:port:handler:] instead");
226- (void)asyncConnectToHost: (
OFString *)host
241- (void)asyncConnectToHost: (
OFString *)host
245 OF_DEPRECATED(ObjFW, 1, 2,
246 "Use -[asyncConnectToHost:port:runLoopMode:handler:] instead");
257- (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:142
uint16_t SOCKS5Port
The port to use on the SOCKS5 proxy.
Definition OFTCPSocket.m:113
OFString * SOCKS5Host
The host to use as a SOCKS5 proxy.
Definition OFTCPSocket.m:103
A struct which represents a host / port pair for a socket.
Definition OFSocket.h:189