17 #import "OFKernelEventObserver.h"
22 OF_ASSUME_NONNULL_BEGIN
39 id _Nullable exception);
50 OFData *_Nonnull data,
id _Nullable exception);
84 didReceiveIntoBuffer: (
void *)buffer
85 length: (
size_t)length
86 exception: (nullable
id)exception;
97 didSendData: (
OFData *)data
98 exception: (nullable
id)exception;
111 exception: (nullable
id)exception;
131 bool _canBlock, _listening;
133 id _Nullable _delegate;
142 @property (nonatomic)
bool canBlock;
147 @property (readonly, nonatomic, getter=isListening)
bool listening;
162 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
170 + (instancetype)socket;
181 - (size_t)receiveIntoBuffer: (
void *)buffer length: (
size_t)length;
192 - (void)asyncReceiveIntoBuffer: (
void *)buffer length: (
size_t)length;
204 - (void)asyncReceiveIntoBuffer: (
void *)buffer
205 length: (
size_t)length
208 #ifdef OF_HAVE_BLOCKS
224 asyncReceiveIntoBuffer: (
void *)buffer
225 length: (
size_t)length
245 asyncReceiveIntoBuffer: (
void *)buffer
246 length: (
size_t)length
258 - (void)sendBuffer: (const
void *)buffer length: (
size_t)length;
265 - (void)asyncSendData: (
OFData *)data;
273 - (void)asyncSendData: (
OFData *)data
276 #ifdef OF_HAVE_BLOCKS
285 - (void)asyncSendData: (
OFData *)data
298 - (void)asyncSendData: (
OFData *)data
309 - (void)listenWithBacklog: (
int)backlog;
321 - (instancetype)accept;
335 #ifdef OF_HAVE_BLOCKS
343 - (void)asyncAcceptWithBlock:
361 - (void)cancelAsyncRequests;
370 OF_ASSUME_NONNULL_END
OFData *_Nullable(^ of_sequenced_packet_socket_async_send_data_block_t)(OFData *_Nonnull data, id _Nullable exception)
A block which is called when a packet has been sent.
Definition: OFSequencedPacketSocket.h:49
bool(^ of_sequenced_packet_socket_async_receive_block_t)(size_t length, id _Nullable exception)
A block which is called when a packet has been received.
Definition: OFSequencedPacketSocket.h:38
bool(^ of_sequenced_packet_socket_async_accept_block_t)(OFSequencedPacketSocket *acceptedSocket, id _Nullable exception)
A block which is called when the socket accepted a connection.
Definition: OFSequencedPacketSocket.h:61
struct objc_object * id
A pointer to any object.
Definition: ObjFWRT.h:90
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:40
The root class for all other classes inside ObjFW.
Definition: OFObject.h:520
A base class for sequenced packet sockets.
Definition: OFSequencedPacketSocket.h:130
A protocol for the creation of copies.
Definition: OFObject.h:1187
This protocol is implemented by classes which can be observed for readiness for reading by OFKernelEv...
Definition: OFKernelEventObserver.h:85
This protocol is implemented by classes which can be observed for readiness for writing by OFKernelEv...
Definition: OFKernelEventObserver.h:100
A delegate for OFSequencedPacketSocket.
Definition: OFSequencedPacketSocket.h:71
A struct which represents a host / port pair for a socket.
Definition: socket.h:136