28OF_ASSUME_NONNULL_BEGIN
31@protocol OFRunLoopConnectDelegate <
OFObject>
32- (void)of_socketDidConnect: (
id)socket
33 exception: (nullable
id)exception;
34- (id)of_connectionFailedExceptionForErrNo: (
int)errNo;
40+ (void)of_setMainRunLoop: (
OFRunLoop *)runLoop;
42+ (void)of_addAsyncReadForStream: (
OFStream <OFReadyForReadingObserving> *)
44 buffer: (
void *)buffer
45 length: (
size_t)length
50 delegate: (nullable
id <OFStreamDelegate>)delegate;
51+ (void)of_addAsyncReadForStream: (
OFStream <OFReadyForReadingObserving> *)
53 buffer: (
void *)buffer
54 exactLength: (
size_t)length
59 delegate: (nullable
id <OFStreamDelegate>)delegate;
60+ (void)of_addAsyncReadLineForStream: (
OFStream <OFReadyForReadingObserving> *)
67 delegate: (nullable
id <OFStreamDelegate>)delegate;
68+ (void)of_addAsyncWriteForStream: (
OFStream <OFReadyForWritingObserving> *)
75 delegate: (nullable
id <OFStreamDelegate>)delegate;
76+ (void)of_addAsyncWriteForStream: (
OFStream <OFReadyForWritingObserving> *)
84 delegate: (nullable
id <OFStreamDelegate>)delegate;
85# if !defined(OF_WII) && !defined(OF_NINTENDO_3DS)
86+ (void)of_addAsyncConnectForSocket: (
id)socket
88 delegate: (
id <OFRunLoopConnectDelegate>)delegate;
90+ (void)of_addAsyncAcceptForSocket: (
id)socket
92 block: (nullable
id)block
93 delegate: (nullable
id)delegate;
95 buffer: (
void *)buffer
96 length: (
size_t)length
101 delegate: (nullable
id <OFDatagramSocketDelegate>) delegate;
106# ifdef OF_HAVE_BLOCKS
109 delegate: (nullable
id <OFDatagramSocketDelegate>)delegate;
110+ (void)of_addAsyncReceiveForSequencedPacketSocket:
112 buffer: (
void *)buffer
113 length: (
size_t)length
115# ifdef OF_HAVE_BLOCKS
118 delegate: (nullable
id <OFSequencedPacketSocketDelegate>) delegate;
119+ (void)of_addAsyncSendForSequencedPacketSocket:
123# ifdef OF_HAVE_BLOCKS
126 delegate: (nullable
id <OFSequencedPacketSocketDelegate>)delegate;
127+ (void)of_cancelAsyncRequestsForObject: (
id)object mode: (
OFRunLoopMode)mode;
OFData *(^ OFDatagramSocketAsyncSendDataBlock)(id exception)
A block which is called when a packet has been sent.
Definition OFDatagramSocket.h:52
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
bool(^ OFSequencedPacketSocketAsyncReceiveBlock)(size_t length, id exception)
A block which is called when a packet has been received.
Definition OFSequencedPacketSocket.h:41
OFData *(^ OFSequencedPacketSocketAsyncSendDataBlock)(id exception)
A block which is called when a packet has been sent.
Definition OFSequencedPacketSocket.h:51
OFData *(^ OFStreamAsyncWriteDataBlock)(size_t bytesWritten, id exception)
A block which is called when data was written asynchronously to a stream.
Definition OFStream.h:79
bool(^ OFStreamAsyncReadBlock)(size_t length, id exception)
A block which is called when data was read asynchronously from a stream.
Definition OFStream.h:53
bool(^ OFStreamAsyncReadLineBlock)(OFString *line, id exception)
A block which is called when a line was read asynchronously from a stream.
Definition OFStream.h:65
OFString *(^ OFStreamAsyncWriteStringBlock)(size_t bytesWritten, id exception)
A block which is called when a string was written asynchronously to a stream.
Definition OFStream.h:93
OFStringEncoding
The encoding of a string.
Definition OFString.h:65
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 class providing a run loop for the application and its processes.
Definition OFRunLoop.h:66
A base class for sequenced packet sockets.
Definition OFSequencedPacketSocket.h:132
A base class for different types of streams.
Definition OFStream.h:192
A class for handling strings.
Definition OFString.h:139
A class for creating and firing timers.
Definition OFTimer.h:50
A struct which represents a host / port pair for a socket.
Definition OFSocket.h:186