23 OF_ASSUME_NONNULL_BEGIN
42 id _Nullable exception)
43 OF_DEPRECATED(ObjFW, 1, 2,
"Use OFStreamSocketAcceptedHandler instead");
77 exception: (nullable
id)exception;
88 OFSocketHandle _socket;
93 bool _atEndOfStream, _listening;
101 @property (readonly, nonatomic, getter=isListening)
bool listening;
119 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
120 id <OFStreamSocketDelegate> delegate;
127 + (instancetype)socket;
136 - (void)listenWithBacklog: (
int)backlog;
153 - (instancetype)accept;
165 - (void)asyncAcceptWithRunLoopMode: (
OFRunLoopMode)runLoopMode;
167 #ifdef OF_HAVE_BLOCKS 178 OF_DEPRECATED(ObjFW, 1, 2, "Use -[asyncAcceptWithHandler:] instead");
199 - (void)asyncAcceptWithRunLoopMode: (
OFRunLoopMode)runLoopMode
201 OF_DEPRECATED(ObjFW, 1, 2,
202 "Use -[asyncAcceptWithRunLoopMode:handler:] instead");
212 - (void)asyncAcceptWithRunLoopMode: (
OFRunLoopMode)runLoopMode
226 - (void)releaseSocketFromCurrentThread;
238 - (void)obtainSocketForCurrentThread;
241 OF_ASSUME_NONNULL_END
This protocol is implemented by classes which can be observed for readiness for reading by OFKernelEv...
A class for storing constant strings using the @"" literal.
Definition: OFConstantString.h:41
A base class for different types of streams.
Definition: OFStream.h:278
A struct which represents a host / port pair for a socket.
Definition: OFSocket.h:189
instancetype socket()
Returns a new, autoreleased OFStreamSocket.
Definition: OFStreamSocket.m:58
bool(^ OFStreamSocketAcceptedHandler)(OFStreamSocket *socket, OFStreamSocket *acceptedSocket, id exception)
A handler which is called when the socket accepted a connection.
Definition: OFStreamSocket.h:55
This protocol is implemented by classes which can be observed for readiness for writing by OFKernelEv...
bool(^ OFStreamSocketAsyncAcceptBlock)(OFStreamSocket *acceptedSocket, id exception)
A block which is called when the socket accepted a connection.
Definition: OFStreamSocket.h:41
A class which provides methods to create and use stream sockets.
Definition: OFStreamSocket.h:85