17#import "OFKernelEventObserver.h"
21OF_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
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
285- (void)asyncSendData: (
OFData *)data
300- (void)asyncSendData: (
OFData *)data
316- (void)releaseSocketFromCurrentThread;
328- (void)obtainSocketForCurrentThread;
333- (void)cancelAsyncRequests;
OFData *(^ OFDatagramSocketAsyncSendDataBlock)(id exception)
A block which is called when a packet has been sent.
Definition OFDatagramSocket.h:48
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:38
A class for storing arbitrary data in an array.
Definition OFData.h:42
A base class for datagram sockets.
Definition OFDatagramSocket.h:107
The root class for all other classes inside ObjFW.
Definition OFObject.h:688
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 struct which represents a host / port pair for a socket.
Definition OFSocket.h:182