31OF_ASSUME_NONNULL_BEGIN
34@protocol OFRunLoopConnectDelegate <
OFObject>
35- (void)of_socketDidConnect: (
id)socket
36 exception: (nullable
id)exception;
37- (id)of_connectionFailedExceptionForErrNo: (
int)errNo;
43+ (void)of_setMainRunLoop: (
OFRunLoop *)runLoop;
45+ (void)of_addAsyncReadForStream: (
OFStream <OFReadyForReadingObserving> *)
47 buffer: (
void *)buffer
48 length: (
size_t)length
53 delegate: (nullable
id <OFStreamDelegate>)delegate;
54+ (void)of_addAsyncReadForStream: (
OFStream <OFReadyForReadingObserving> *)
56 buffer: (
void *)buffer
57 exactLength: (
size_t)length
62 delegate: (nullable
id <OFStreamDelegate>)delegate;
63+ (void)of_addAsyncReadStringForStream: (
OFStream <OFReadyForReadingObserving
71 delegate: (nullable
id <OFStreamDelegate>)
73+ (void)of_addAsyncReadLineForStream: (
OFStream <OFReadyForReadingObserving> *)
81 delegate: (nullable
id <OFStreamDelegate>)delegate;
82+ (void)of_addAsyncWriteForStream: (
OFStream <OFReadyForWritingObserving> *)
89 delegate: (nullable
id <OFStreamDelegate>)delegate;
90+ (void)of_addAsyncWriteForStream: (
OFStream <OFReadyForWritingObserving> *)
99 delegate: (nullable
id <OFStreamDelegate>)delegate;
100# if !defined(OF_WII) && !defined(OF_NINTENDO_3DS)
101+ (void)of_addAsyncConnectForSocket: (
id)socket
103 delegate: (
id <OFRunLoopConnectDelegate>)delegate;
105+ (void)of_addAsyncAcceptForSocket: (
id)socket
107 handler: (nullable
id)handler
108 delegate: (nullable
id)delegate;
110 buffer: (
void *)buffer
111 length: (
size_t)length
113# ifdef OF_HAVE_BLOCKS
116 delegate: (nullable
id <OFDatagramSocketDelegate>)delegate;
121# ifdef OF_HAVE_BLOCKS
124 delegate: (nullable
id <OFDatagramSocketDelegate>)delegate;
125+ (void)of_addAsyncReceiveForSequencedPacketSocket:
127 buffer: (
void *)buffer
128 length: (
size_t)length
130# ifdef OF_HAVE_BLOCKS
133 delegate: (nullable
id <OFSequencedPacketSocketDelegate>)delegate;
134+ (void)of_addAsyncSendForSequencedPacketSocket:
138# ifdef OF_HAVE_BLOCKS
141 delegate: (nullable
id <OFSequencedPacketSocketDelegate>)delegate;
143+ (void)of_addAsyncReceiveForSCTPSocket: (
OFSCTPSocket *)socket
144 buffer: (
void *)buffer
145 length: (
size_t)length
147# ifdef OF_HAVE_BLOCKS
150 delegate: (nullable
id <OFSCTPSocketDelegate>)delegate;
151+ (void)of_addAsyncSendForSCTPSocket: (
OFSCTPSocket *)socket
155# ifdef OF_HAVE_BLOCKS
158 delegate: (nullable
id <OFSCTPSocketDelegate>)delegate;
160+ (void)of_cancelAsyncRequestsForObject: (
id)object mode: (
OFRunLoopMode)mode;
bool(^ OFDatagramSocketPacketReceivedHandler)(OFDatagramSocket *socket, void *buffer, size_t length, const OFSocketAddress *sender, id exception)
A handler which is called when a packet has been received.
Definition OFDatagramSocket.h:60
OFData *(^ OFDatagramSocketDataSentHandler)(OFDatagramSocket *socket, OFData *data, const OFSocketAddress *receiver, id exception)
A handler which is called when a packet has been sent.
Definition OFDatagramSocket.h:88
bool(^ OFSCTPSocketMessageReceivedHandler)(OFSCTPSocket *socket, void *buffer, size_t length, OFSCTPMessageInfo info, id exception)
A handler which is called when a message has been received.
Definition OFSCTPSocket.h:99
OFData *(^ OFSCTPSocketDataSentHandler)(OFSCTPSocket *socket, OFData *data, OFSCTPMessageInfo info, id exception)
A handler which is called when a message has been sent.
Definition OFSCTPSocket.h:113
OFData *(^ OFSequencedPacketSocketDataSentHandler)(OFSequencedPacketSocket *socket, OFData *data, id exception)
A handler which is called when a packet has been sent.
Definition OFSequencedPacketSocket.h:85
bool(^ OFSequencedPacketSocketPacketReceivedHandler)(OFSequencedPacketSocket *socket, void *buffer, size_t length, id exception)
A handler which is called when a packet has been received.
Definition OFSequencedPacketSocket.h:58
OFData *(^ OFStreamDataWrittenHandler)(OFStream *stream, OFData *data, size_t bytesWritten, id exception)
A handler which is called when data was written asynchronously to a stream.
Definition OFStream.h:132
bool(^ OFStreamReadHandler)(OFStream *stream, void *buffer, size_t length, id exception)
A handler which is called when data was read asynchronously from a stream.
Definition OFStream.h:69
OFString *(^ OFStreamStringWrittenHandler)(OFStream *stream, OFString *string, OFStringEncoding encoding, size_t bytesWritten, id exception)
A handler which is called when a string was written asynchronously to a stream.
Definition OFStream.h:166
bool(^ OFStreamStringReadHandler)(OFStream *stream, OFString *string, id exception)
A block which is called when a string was read asynchronously from a stream.
Definition OFStream.h:83
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:147
An abstract class for storing objects in a dictionary.
Definition OFDictionary.h:84
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 class which provides methods to create and use SCTP sockets in one-to-one mode.
Definition OFSCTPSocket.h:180
A base class for sequenced packet sockets.
Definition OFSequencedPacketSocket.h:184
A base class for different types of streams.
Definition OFStream.h:280
A class for handling strings.
Definition OFString.h:143
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:189