21 #import "OFKernelEventObserver.h"
25 OF_ASSUME_NONNULL_BEGIN
53 id _Nullable exception);
76 didReceiveIntoBuffer: (
void *)buffer
77 length: (
size_t)length
79 exception: (nullable
id)exception;
91 didSendData: (
OFData *)data
93 exception: (nullable
id)exception;
111 OFSocketHandle _socket;
118 bool _canSendToBroadcastAddresses;
120 id <OFDatagramSocketDelegate> _Nullable _delegate;
132 @property (nonatomic)
bool canBlock;
140 @property (nonatomic)
bool canSendToBroadcastAddresses;
148 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
149 id <OFDatagramSocketDelegate> delegate;
156 + (instancetype)socket;
171 - (size_t)receiveIntoBuffer: (
void *)buffer
172 length: (
size_t)length
184 - (void)asyncReceiveIntoBuffer: (
void *)buffer length: (
size_t)length;
197 - (void)asyncReceiveIntoBuffer: (
void *)buffer
198 length: (
size_t)length
201 #ifdef OF_HAVE_BLOCKS
217 - (void)asyncReceiveIntoBuffer: (
void *)buffer
218 length: (
size_t)length
238 - (void)asyncReceiveIntoBuffer: (
void *)buffer
239 length: (
size_t)length
254 - (void)sendBuffer: (const
void *)buffer
255 length: (
size_t)length
265 - (void)asyncSendData: (
OFData *)data
277 - (void)asyncSendData: (
OFData *)data
281 #ifdef OF_HAVE_BLOCKS
292 - (void)asyncSendData: (
OFData *)data
308 - (void)asyncSendData: (
OFData *)data
324 - (void)releaseSocketFromCurrentThread;
336 - (void)obtainSocketForCurrentThread;
341 - (void)cancelAsyncRequests;
352 OF_ASSUME_NONNULL_END
bool(^ OFDatagramSocketAsyncReceiveBlock)(size_t length, const OFSocketAddress *sender, id exception)
A block which is called when a packet has been received.
Definition: OFDatagramSocket.h:42
OFData *(^ OFDatagramSocketAsyncSendDataBlock)(id exception)
A block which is called when a packet has been sent.
Definition: OFDatagramSocket.h:52
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
A base class for datagram sockets.
Definition: OFDatagramSocket.h:111
The root class for all other classes inside ObjFW.
Definition: OFObject.h:692
A protocol for the creation of copies.
Definition: OFObject.h:1350
A delegate for OFDatagramSocket.
Definition: OFDatagramSocket.h:62
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 struct which represents a host / port pair for a socket.
Definition: OFSocket.h:186