18 #ifdef OF_HAVE_SOCKETS 24 OF_ASSUME_NONNULL_BEGIN
26 #ifdef OF_HAVE_SOCKETS 27 @protocol OFRunLoopConnectDelegate <
OFObject>
28 - (void)of_socketDidConnect: (
id)socket
29 exception: (nullable
id)exception;
30 - (id)of_connectionFailedExceptionForErrNo: (
int)errNo;
36 + (void)of_setMainRunLoop: (
OFRunLoop *)runLoop;
37 #ifdef OF_HAVE_SOCKETS 40 buffer: (
void *)buffer
41 length: (
size_t)length
43 # ifdef OF_HAVE_BLOCKS
49 buffer: (
void *)buffer
50 exactLength: (
size_t)length
52 # ifdef OF_HAVE_BLOCKS
60 # ifdef OF_HAVE_BLOCKS
68 # ifdef OF_HAVE_BLOCKS
77 # ifdef OF_HAVE_BLOCKS
81 # if !defined(OF_WII) && !defined(OF_NINTENDO_3DS) 82 + (void)of_addAsyncConnectForSocket: (
id)socket
84 delegate: (
id <OFRunLoopConnectDelegate>)delegate;
86 + (void)of_addAsyncAcceptForSocket: (
id)socket
88 block: (nullable
id)block
89 delegate: (nullable
id)delegate;
91 buffer: (
void *)buffer
92 length: (
size_t)length
94 # ifdef OF_HAVE_BLOCKS
102 # ifdef OF_HAVE_BLOCKS
106 + (void)of_addAsyncReceiveForSequencedPacketSocket:
108 buffer: (
void *)buffer
109 length: (
size_t)length
111 # ifdef OF_HAVE_BLOCKS
115 + (void)of_addAsyncSendForSequencedPacketSocket:
119 # ifdef OF_HAVE_BLOCKS
123 + (void)of_cancelAsyncRequestsForObject: (
id)object mode: (
OFRunLoopMode)mode;
128 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:49
OFStringEncoding
The encoding of a string.
Definition: OFString.h:61
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:37
The root class for all other classes inside ObjFW.
Definition: OFObject.h:686
OFString *(^ OFStreamAsyncWriteStringBlock)(size_t bytesWritten, id exception)
A block which is called when a string was written asynchronously to a stream.
Definition: OFStream.h:89
OFData *(^ OFSequencedPacketSocketAsyncSendDataBlock)(id exception)
A block which is called when a packet has been sent.
Definition: OFSequencedPacketSocket.h:47
A base class for different types of streams.
Definition: OFStream.h:186
A struct which represents a host / port pair for a socket.
Definition: OFSocket.h:182
A class for handling strings.
Definition: OFString.h:134
OFData *(^ OFStreamAsyncWriteDataBlock)(size_t bytesWritten, id exception)
A block which is called when data was written asynchronously to a stream.
Definition: OFStream.h:75
bool(^ OFStreamAsyncReadLineBlock)(OFString *line, id exception)
A block which is called when a line was read asynchronously from a stream.
Definition: OFStream.h:61
A class for creating and firing timers.
Definition: OFTimer.h:44
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:37
A class providing a run loop for the application and its processes.
Definition: OFRunLoop.h:61
A class for storing arbitrary data in an array.
Definition: OFData.h:41
A delegate for OFDatagramSocket.
A base class for sequenced packet sockets.
Definition: OFSequencedPacketSocket.h:125
A base class for datagram sockets.
Definition: OFDatagramSocket.h:104
A delegate for OFSequencedPacketSocket.
OFData *(^ OFDatagramSocketAsyncSendDataBlock)(id exception)
A block which is called when a packet has been sent.
Definition: OFDatagramSocket.h:48