17 #import "OFKernelEventObserver.h"
21 OF_ASSUME_NONNULL_BEGIN
38 id _Nullable exception);
48 id _Nullable exception);
82 didReceiveIntoBuffer: (
void *)buffer
83 length: (
size_t)length
84 exception: (nullable
id)exception;
95 didSendData: (
OFData *)data
96 exception: (nullable
id)exception;
109 exception: (nullable
id)exception;
128 OFSocketHandle _socket;
133 bool _canBlock, _listening;
135 id _Nullable _delegate;
147 @property (nonatomic)
bool canBlock;
152 @property (readonly, nonatomic, getter=isListening)
bool listening;
170 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
171 id <OFSequencedPacketSocketDelegate> delegate;
178 + (instancetype)socket;
191 - (size_t)receiveIntoBuffer: (
void *)buffer length: (
size_t)length;
202 - (void)asyncReceiveIntoBuffer: (
void *)buffer length: (
size_t)length;
214 - (void)asyncReceiveIntoBuffer: (
void *)buffer
215 length: (
size_t)length
218 #ifdef OF_HAVE_BLOCKS
233 - (void)asyncReceiveIntoBuffer: (
void *)buffer
234 length: (
size_t)length
252 - (void)asyncReceiveIntoBuffer: (
void *)buffer
253 length: (
size_t)length
266 - (void)sendBuffer: (const
void *)buffer length: (
size_t)length;
273 - (void)asyncSendData: (
OFData *)data;
283 #ifdef OF_HAVE_BLOCKS
292 - (void)asyncSendData: (
OFData *)data
304 - (void)asyncSendData: (
OFData *)data
316 - (void)listenWithBacklog: (
int)backlog;
333 - (instancetype)accept;
345 - (void)asyncAcceptWithRunLoopMode: (
OFRunLoopMode)runLoopMode;
347 #ifdef OF_HAVE_BLOCKS
373 - (void)cancelAsyncRequests;
385 - (void)releaseSocketFromCurrentThread;
397 - (void)obtainSocketForCurrentThread;
408 OF_ASSUME_NONNULL_END
bool(^ OFSequencedPacketSocketAsyncReceiveBlock)(size_t length, id exception)
A block which is called when a packet has been received.
Definition: OFSequencedPacketSocket.h:37
OFData *(^ OFSequencedPacketSocketAsyncSendDataBlock)(id exception)
A block which is called when a packet has been sent.
Definition: OFSequencedPacketSocket.h:47
bool(^ OFSequencedPacketSocketAsyncAcceptBlock)(OFSequencedPacketSocket *acceptedSocket, id exception)
A block which is called when the socket accepted a connection.
Definition: OFSequencedPacketSocket.h:59
A class for storing constant strings using the @"" literal.
Definition: OFConstantString.h:38
A class for storing arbitrary data in an array.
Definition: OFData.h:42
The root class for all other classes inside ObjFW.
Definition: OFObject.h:688
A base class for sequenced packet sockets.
Definition: OFSequencedPacketSocket.h:128
A protocol for the creation of copies.
Definition: OFObject.h:1346
This protocol is implemented by classes which can be observed for readiness for reading by OFKernelEv...
Definition: OFKernelEventObserver.h:84
This protocol is implemented by classes which can be observed for readiness for writing by OFKernelEv...
Definition: OFKernelEventObserver.h:99
A delegate for OFSequencedPacketSocket.
Definition: OFSequencedPacketSocket.h:69
A struct which represents a host / port pair for a socket.
Definition: OFSocket.h:182