24OF_ASSUME_NONNULL_BEGIN
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;
38+ (void)of_addAsyncReadForStream: (
OFStream <OFReadyForReadingObserving> *)
40 buffer: (
void *)buffer
41 length: (
size_t)length
46 delegate: (nullable
id <OFStreamDelegate>)delegate;
47+ (void)of_addAsyncReadForStream: (
OFStream <OFReadyForReadingObserving> *)
49 buffer: (
void *)buffer
50 exactLength: (
size_t)length
55 delegate: (nullable
id <OFStreamDelegate>)delegate;
56+ (void)of_addAsyncReadLineForStream: (
OFStream <OFReadyForReadingObserving> *)
63 delegate: (nullable
id <OFStreamDelegate>)delegate;
64+ (void)of_addAsyncWriteForStream: (
OFStream <OFReadyForWritingObserving> *)
71 delegate: (nullable
id <OFStreamDelegate>)delegate;
72+ (void)of_addAsyncWriteForStream: (
OFStream <OFReadyForWritingObserving> *)
80 delegate: (nullable
id <OFStreamDelegate>)delegate;
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
97 delegate: (nullable
id <OFDatagramSocketDelegate>) delegate;
102# ifdef OF_HAVE_BLOCKS
105 delegate: (nullable
id <OFDatagramSocketDelegate>)delegate;
106+ (void)of_addAsyncReceiveForSequencedPacketSocket:
108 buffer: (
void *)buffer
109 length: (
size_t)length
111# ifdef OF_HAVE_BLOCKS
114 delegate: (nullable
id <OFSequencedPacketSocketDelegate>) delegate;
115+ (void)of_addAsyncSendForSequencedPacketSocket:
119# ifdef OF_HAVE_BLOCKS
122 delegate: (nullable
id <OFSequencedPacketSocketDelegate>)delegate;
123+ (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:48
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
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
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(^ OFStreamAsyncReadBlock)(size_t length, id exception)
A block which is called when data was read asynchronously from a stream.
Definition OFStream.h:49
bool(^ OFStreamAsyncReadLineBlock)(OFString *line, id exception)
A block which is called when a line was read asynchronously from a stream.
Definition OFStream.h:61
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
OFStringEncoding
The encoding of a string.
Definition OFString.h:61
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
A base class for datagram sockets.
Definition OFDatagramSocket.h:107
The root class for all other classes inside ObjFW.
Definition OFObject.h:688
A class providing a run loop for the application and its processes.
Definition OFRunLoop.h:62
A base class for sequenced packet sockets.
Definition OFSequencedPacketSocket.h:128
A base class for different types of streams.
Definition OFStream.h:188
A class for handling strings.
Definition OFString.h:135
A class for creating and firing timers.
Definition OFTimer.h:46
A struct which represents a host / port pair for a socket.
Definition OFSocket.h:182