19 #ifdef OF_HAVE_SOCKETS 23 OF_ASSUME_NONNULL_BEGIN
26 + (void)of_setMainRunLoop: (
OFRunLoop *)runLoop;
27 #ifdef OF_HAVE_SOCKETS 28 + (void)of_addAsyncReadForStream: (
OFStream *)stream
29 buffer: (
void *)buffer
30 length: (
size_t)length
32 selector: (
SEL)selector;
33 + (void)of_addAsyncReadForStream: (
OFStream *)stream
34 buffer: (
void *)buffer
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
46 buffer: (
void *)buffer
47 length: (
size_t)length
49 selector: (
SEL)selector;
50 # ifdef OF_HAVE_BLOCKS 51 + (void)of_addAsyncReadForStream: (
OFStream *)stream
52 buffer: (
void *)buffer
53 length: (
size_t)length
55 + (void)of_addAsyncReadForStream: (
OFStream *)stream
56 buffer: (
void *)buffer
57 exactLength: (
size_t)length
59 + (void)of_addAsyncReadLineForStream: (
OFStream *)stream
62 + (void)of_addAsyncAcceptForTCPSocket: (
OFTCPSocket *)socket
65 + (void)of_addAsyncReceiveForUDPSocket: (
OFUDPSocket *)socket
66 buffer: (
void *)buffer
67 length: (
size_t)length
71 + (void)of_cancelAsyncRequestsForObject: (
id)object;
73 - (void)of_removeTimer: (
OFTimer *)timer;
bool(^ of_stream_async_read_block_t)(OFStream *stream, void *buffer, size_t length, OFException *_Nullable exception)
A block which is called when data was read from the stream.
Definition: OFStream.h:51
A class which provides methods to create and use UDP sockets.
Definition: OFUDPSocket.h:90
A class providing a run loop for the application and its processes.
Definition: OFRunLoop.h:41
A class which provides methods to create and use TCP sockets.
Definition: OFTCPSocket.h:61
bool(^ of_tcp_socket_async_accept_block_t)(OFTCPSocket *socket, OFTCPSocket *acceptedSocket, OFException *_Nullable exception)
A block which is called when the socket accepted a connection.
Definition: OFTCPSocket.h:49
of_string_encoding_t
The encoding of a string.
Definition: OFString.h:53
bool(^ of_udp_socket_async_receive_block_t)(OFUDPSocket *socket, void *buffer, size_t length, of_udp_socket_address_t sender, OFException *_Nullable exception)
A block which is called when a packet has been received.
Definition: OFUDPSocket.h:65
A base class for different types of streams.
Definition: OFStream.h:88
bool(^ of_stream_async_read_line_block_t)(OFStream *stream, OFString *_Nullable line, OFException *_Nullable exception)
A block which is called when a line was read from the stream.
Definition: OFStream.h:64
A class for creating and firing timers.
Definition: OFTimer.h:44