22 #ifdef OF_HAVE_SOCKETS 28 OF_ASSUME_NONNULL_BEGIN
30 #ifdef OF_HAVE_SOCKETS 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;
41 #ifdef OF_HAVE_SOCKETS 44 buffer: (
void *)buffer
45 length: (
size_t)length
47 # ifdef OF_HAVE_BLOCKS
53 buffer: (
void *)buffer
54 exactLength: (
size_t)length
56 # ifdef OF_HAVE_BLOCKS
64 # ifdef OF_HAVE_BLOCKS
72 # ifdef OF_HAVE_BLOCKS
81 # ifdef OF_HAVE_BLOCKS
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
98 # ifdef OF_HAVE_BLOCKS
106 # ifdef OF_HAVE_BLOCKS
110 + (void)of_addAsyncReceiveForSequencedPacketSocket:
112 buffer: (
void *)buffer
113 length: (
size_t)length
115 # ifdef OF_HAVE_BLOCKS
119 + (void)of_addAsyncSendForSequencedPacketSocket:
123 # ifdef OF_HAVE_BLOCKS
127 + (void)of_cancelAsyncRequestsForObject: (
id)object mode: (
OFRunLoopMode)mode;
132 OF_ASSUME_NONNULL_END
This protocol is implemented by classes which can be observed for readiness for reading by OFKernelEv...
bool(^ OFStreamAsyncReadBlock)(size_t length, id exception)
A block which is called when data was read asynchronously from a stream.
Definition: OFStream.h:53
OFStringEncoding
The encoding of a string.
Definition: OFString.h:65
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
A class for storing constant strings using the @"" literal.
Definition: OFConstantString.h:41
The root class for all other classes inside ObjFW.
Definition: OFObject.h:690
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
OFData *(^ OFSequencedPacketSocketAsyncSendDataBlock)(id exception)
A block which is called when a packet has been sent.
Definition: OFSequencedPacketSocket.h:51
A base class for different types of streams.
Definition: OFStream.h:190
A struct which represents a host / port pair for a socket.
Definition: OFSocket.h:186
A class for handling strings.
Definition: OFString.h:138
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(^ OFStreamAsyncReadLineBlock)(OFString *line, id exception)
A block which is called when a line was read asynchronously from a stream.
Definition: OFStream.h:65
A class for creating and firing timers.
Definition: OFTimer.h:48
This protocol is implemented by classes which can be observed for readiness for writing by OFKernelEv...
bool(^ OFSequencedPacketSocketAsyncReceiveBlock)(size_t length, id exception)
A block which is called when a packet has been received.
Definition: OFSequencedPacketSocket.h:41
A class providing a run loop for the application and its processes.
Definition: OFRunLoop.h:65
A class for storing arbitrary data in an array.
Definition: OFData.h:45
A delegate for OFDatagramSocket.
A base class for sequenced packet sockets.
Definition: OFSequencedPacketSocket.h:129
A base class for datagram sockets.
Definition: OFDatagramSocket.h:108
A delegate for OFSequencedPacketSocket.
OFData *(^ OFDatagramSocketAsyncSendDataBlock)(id exception)
A block which is called when a packet has been sent.
Definition: OFDatagramSocket.h:52