21 #import "OFKernelEventObserver.h"
25 OF_ASSUME_NONNULL_BEGIN
42 id _Nullable exception);
52 id _Nullable exception);
86 didReceiveIntoBuffer: (
void *)buffer
87 length: (
size_t)length
88 exception: (nullable
id)exception;
99 didSendData: (
OFData *)data
100 exception: (nullable
id)exception;
113 exception: (nullable
id)exception;
132 OFSocketHandle _socket;
137 bool _canBlock, _listening;
139 id _Nullable _delegate;
151 @property (nonatomic)
bool canBlock;
156 @property (readonly, nonatomic, getter=isListening)
bool listening;
174 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
175 id <OFSequencedPacketSocketDelegate> delegate;
182 + (instancetype)socket;
195 - (size_t)receiveIntoBuffer: (
void *)buffer length: (
size_t)length;
206 - (void)asyncReceiveIntoBuffer: (
void *)buffer length: (
size_t)length;
219 - (void)asyncReceiveIntoBuffer: (
void *)buffer
220 length: (
size_t)length
223 #ifdef OF_HAVE_BLOCKS
238 - (void)asyncReceiveIntoBuffer: (
void *)buffer
239 length: (
size_t)length
258 - (void)asyncReceiveIntoBuffer: (
void *)buffer
259 length: (
size_t)length
272 - (void)sendBuffer: (const
void *)buffer length: (
size_t)length;
279 - (void)asyncSendData: (
OFData *)data;
290 #ifdef OF_HAVE_BLOCKS
299 - (void)asyncSendData: (
OFData *)data
312 - (void)asyncSendData: (
OFData *)data
324 - (void)listenWithBacklog: (
int)backlog;
341 - (instancetype)accept;
354 - (void)asyncAcceptWithRunLoopMode: (
OFRunLoopMode)runLoopMode;
356 #ifdef OF_HAVE_BLOCKS
383 - (void)cancelAsyncRequests;
395 - (void)releaseSocketFromCurrentThread;
407 - (void)obtainSocketForCurrentThread;
418 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:41
OFData *(^ OFSequencedPacketSocketAsyncSendDataBlock)(id exception)
A block which is called when a packet has been sent.
Definition: OFSequencedPacketSocket.h:51
bool(^ OFSequencedPacketSocketAsyncAcceptBlock)(OFSequencedPacketSocket *acceptedSocket, id exception)
A block which is called when the socket accepted a connection.
Definition: OFSequencedPacketSocket.h:63
A class for storing constant strings using the @"" literal.
Definition: OFConstantString.h:42
A class for storing arbitrary data in an array.
Definition: OFData.h:46
The root class for all other classes inside ObjFW.
Definition: OFObject.h:692
A base class for sequenced packet sockets.
Definition: OFSequencedPacketSocket.h:132
A protocol for the creation of copies.
Definition: OFObject.h:1350
This protocol is implemented by classes which can be observed for readiness for reading by OFKernelEv...
Definition: OFKernelEventObserver.h:88
This protocol is implemented by classes which can be observed for readiness for writing by OFKernelEv...
Definition: OFKernelEventObserver.h:103
A delegate for OFSequencedPacketSocket.
Definition: OFSequencedPacketSocket.h:73
A struct which represents a host / port pair for a socket.
Definition: OFSocket.h:186