17#import "OFKernelEventObserver.h"
21OF_ASSUME_NONNULL_BEGIN
38 id _Nullable exception);
48 id _Nullable exception);
69@protocol OFSequencedPacketSocketDelegate <
OFObject>
82 didReceiveIntoBuffer: (
void *)buffer
83 length: (
size_t)length
84 exception: (nullable
id)exception;
95 didSendData: (
OFData *)data
96 exception: (nullable
id)exception;
109 exception: (nullable
id)exception;
128 OFSocketHandle _socket;
133 bool _canBlock, _listening;
135 id _Nullable _delegate;
147@property (nonatomic)
bool canBlock;
152@property (readonly, nonatomic, getter=isListening)
bool listening;
170@property OF_NULLABLE_PROPERTY (assign, nonatomic)
171 id <OFSequencedPacketSocketDelegate> delegate;
178+ (instancetype)socket;
191- (size_t)receiveIntoBuffer: (
void *)buffer length: (
size_t)length;
202- (void)asyncReceiveIntoBuffer: (
void *)buffer length: (
size_t)length;
215- (void)asyncReceiveIntoBuffer: (
void *)buffer
216 length: (
size_t)length
234- (void)asyncReceiveIntoBuffer: (
void *)buffer
235 length: (
size_t)length
254- (void)asyncReceiveIntoBuffer: (
void *)buffer
255 length: (
size_t)length
268- (void)sendBuffer: (const
void *)buffer length: (
size_t)length;
275- (void)asyncSendData: (
OFData *)data;
295- (void)asyncSendData: (
OFData *)data
308- (void)asyncSendData: (
OFData *)data
320- (void)listenWithBacklog: (
int)backlog;
337- (instancetype)accept;
350- (void)asyncAcceptWithRunLoopMode: (
OFRunLoopMode)runLoopMode;
379- (void)cancelAsyncRequests;
391- (void)releaseSocketFromCurrentThread;
403- (void)obtainSocketForCurrentThread;
bool(^ OFSequencedPacketSocketAsyncReceiveBlock)(size_t length, id exception)
A block which is called when a packet has been received.
Definition OFSequencedPacketSocket.h:37
OFData *(^ OFSequencedPacketSocketAsyncSendDataBlock)(id exception)
A block which is called when a packet has been sent.
Definition OFSequencedPacketSocket.h:47
bool(^ OFSequencedPacketSocketAsyncAcceptBlock)(OFSequencedPacketSocket *acceptedSocket, id exception)
A block which is called when the socket accepted a connection.
Definition OFSequencedPacketSocket.h:59
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
The root class for all other classes inside ObjFW.
Definition OFObject.h:688
A base class for sequenced packet sockets.
Definition OFSequencedPacketSocket.h:128
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