17 #import "OFKernelEventObserver.h" 21 OF_ASSUME_NONNULL_BEGIN
49 id _Nullable exception);
72 didReceiveIntoBuffer: (
void *)buffer
73 length: (
size_t)length
75 exception: (nullable
id)exception;
87 didSendData: (
OFData *)data
89 exception: (nullable
id)exception;
107 OFSocketHandle _socket;
114 bool _canSendToBroadcastAddresses;
116 id <OFDatagramSocketDelegate> _Nullable _delegate;
128 @property (nonatomic)
bool canBlock;
136 @property (nonatomic)
bool canSendToBroadcastAddresses;
144 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
145 id <OFDatagramSocketDelegate> delegate;
152 + (instancetype)socket;
167 - (size_t)receiveIntoBuffer: (
void *)buffer
168 length: (
size_t)length
180 - (void)asyncReceiveIntoBuffer: (
void *)buffer length: (
size_t)length;
192 - (void)asyncReceiveIntoBuffer: (
void *)buffer
193 length: (
size_t)length
196 #ifdef OF_HAVE_BLOCKS 212 - (void)asyncReceiveIntoBuffer: (
void *)buffer
213 length: (
size_t)length
232 - (void)asyncReceiveIntoBuffer: (
void *)buffer
233 length: (
size_t)length
248 - (void)sendBuffer: (const
void *)buffer
249 length: (
size_t)length
259 - (void)asyncSendData: (
OFData *)data
270 - (void)asyncSendData: (
OFData *)data
274 #ifdef OF_HAVE_BLOCKS 285 - (void)asyncSendData: (
OFData *)data
300 - (void)asyncSendData: (
OFData *)data
316 - (void)releaseSocketFromCurrentThread;
328 - (void)obtainSocketForCurrentThread;
333 - (void)cancelAsyncRequests;
344 OF_ASSUME_NONNULL_END
This protocol is implemented by classes which can be observed for readiness for reading by OFKernelEv...
bool(^ OFDatagramSocketAsyncReceiveBlock)(size_t length, const OFSocketAddress *sender, id exception)
A block which is called when a packet has been received.
Definition: OFDatagramSocket.h:38
A class for storing constant strings using the @"" literal.
Definition: OFConstantString.h:37
The root class for all other classes inside ObjFW.
Definition: OFObject.h:686
A struct which represents a host / port pair for a socket.
Definition: OFSocket.h:182
This protocol is implemented by classes which can be observed for readiness for writing by OFKernelEv...
A protocol for the creation of copies.
Definition: OFObject.h:1346
A class for storing arbitrary data in an array.
Definition: OFData.h:41
A delegate for OFDatagramSocket.
A base class for datagram sockets.
Definition: OFDatagramSocket.h:104
OFData *(^ OFDatagramSocketAsyncSendDataBlock)(id exception)
A block which is called when a packet has been sent.
Definition: OFDatagramSocket.h:48