19 #ifdef OF_HAVE_SOCKETS
23 OF_ASSUME_NONNULL_BEGIN
25 @interface OFRunLoop (OF_PRIVATE_CATEGORY)
26 + (void)OF_setMainRunLoop: (
OFRunLoop*)runLoop;
27 #ifdef OF_HAVE_SOCKETS
28 + (void)OF_addAsyncReadForStream: (
OFStream*)stream
30 length: (
size_t)length
32 selector: (
SEL)selector;
33 + (void)OF_addAsyncReadForStream: (
OFStream*)stream
35 exactLength: (
size_t)length
37 selector: (
SEL)selector;
38 + (void)OF_addAsyncReadLineForStream: (
OFStream*)stream
41 selector: (
SEL)selector;
42 + (void)OF_addAsyncAcceptForTCPSocket: (
OFTCPSocket*)socket
44 selector: (
SEL)selector;
45 + (void)OF_addAsyncReceiveForUDPSocket: (
OFUDPSocket*)socket
47 length: (
size_t)length
49 selector: (
SEL)selector;
50 # ifdef OF_HAVE_BLOCKS
51 + (void)OF_addAsyncReadForStream: (
OFStream*)stream
53 length: (
size_t)length
55 + (void)OF_addAsyncReadForStream: (
OFStream*)stream
57 exactLength: (
size_t)length
59 + (void)OF_addAsyncReadLineForStream: (
OFStream*)stream
62 + (void)OF_addAsyncAcceptForTCPSocket: (
OFTCPSocket*)socket
65 + (void)OF_addAsyncReceiveForUDPSocket: (
OFUDPSocket*)socket
67 length: (
size_t)length
71 + (void)OF_cancelAsyncRequestsForObject: (
id)object;
73 - (void)OF_removeTimer: (
OFTimer*)timer;
A class which provides functions to create and use UDP sockets.
Definition: OFUDPSocket.h:89
of_string_encoding_t
The encoding of a string.
Definition: OFString.h:50
bool(^ of_stream_async_read_block_t)(OFStream *stream, void *buffer, size_t length, OFException *OF_NULLABLE exception)
A block which is called when data was read from the stream.
Definition: OFStream.h:50
A base class for different types of streams.
Definition: OFStream.h:86
bool(^ of_stream_async_read_line_block_t)(OFStream *stream, OFString *OF_NULLABLE line, OFException *OF_NULLABLE exception)
A block which is called when a line was read from the stream.
Definition: OFStream.h:62
A class which provides functions to create and use TCP sockets.
Definition: OFTCPSocket.h:61
A class for creating and firing timers.
Definition: OFTimer.h:44
bool(^ of_tcp_socket_async_accept_block_t)(OFTCPSocket *socket, OFTCPSocket *acceptedSocket, OFException *OF_NULLABLE exception)
A block which is called when the socket accepted a connection.
Definition: OFTCPSocket.h:49
A class providing a run loop for the application and its processes.
Definition: OFRunLoop.h:40
bool(^ of_udp_socket_async_receive_block_t)(OFUDPSocket *socket, void *buffer, size_t length, of_udp_socket_address_t sender, OFException *OF_NULLABLE exception)
A block which is called when a packet has been received.
Definition: OFUDPSocket.h:65