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;
133@property (nonatomic) uint16_t SOCKS5Port;
141@property OF_NULLABLE_PROPERTY (assign, nonatomic)
142 id <OFTCPSocketDelegate> delegate;
150+ (
void)setSOCKS5Host: (nullable
OFString *)SOCKS5Host;
164+ (
void)setSOCKS5Port: (uint16_t)SOCKS5Port;
171+ (uint16_t)SOCKS5Port;
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
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
OFString * SOCKS5Host
The host to use as a SOCKS5 proxy.
Definition OFTCPSocket.h:128
A struct which represents a host / port pair for a socket.
Definition OFSocket.h:189