ObjFW
Classes | Typedefs
OFSequencedPacketSocket.h File Reference
#import "OFObject.h"
#import "OFKernelEventObserver.h"
#import "OFRunLoop.h"
#import "socket.h"
Include dependency graph for OFSequencedPacketSocket.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

protocol  <OFSequencedPacketSocketDelegate>
 A delegate for OFSequencedPacketSocket. More...
 
class  OFSequencedPacketSocket
 A base class for sequenced packet sockets. More...
 

Typedefs

typedef bool(^ of_sequenced_packet_socket_async_receive_block_t) (size_t length, id _Nullable exception)
 A block which is called when a packet has been received. More...
 
typedef OFData *_Nullable(^ of_sequenced_packet_socket_async_send_data_block_t) (OFData *_Nonnull data, id _Nullable exception)
 A block which is called when a packet has been sent. More...
 
typedef bool(^ of_sequenced_packet_socket_async_accept_block_t) (OFSequencedPacketSocket *acceptedSocket, id _Nullable exception)
 A block which is called when the socket accepted a connection. More...
 

Typedef Documentation

◆ of_sequenced_packet_socket_async_accept_block_t

typedef bool(^ of_sequenced_packet_socket_async_accept_block_t) (OFSequencedPacketSocket *acceptedSocket, id _Nullable exception)

A block which is called when the socket accepted a connection.

Parameters
acceptedSocketThe socket which has been accepted
exceptionAn exception which occurred while accepting the socket or nil on success
Returns
A bool whether the same block should be used for the next incoming connection

◆ of_sequenced_packet_socket_async_receive_block_t

typedef bool(^ of_sequenced_packet_socket_async_receive_block_t) (size_t length, id _Nullable exception)

A block which is called when a packet has been received.

Parameters
lengthThe length of the packet
exceptionAn exception which occurred while receiving or nil on success
Returns
A bool whether the same block should be used for the next receive

◆ of_sequenced_packet_socket_async_send_data_block_t

typedef OFData* _Nullable(^ of_sequenced_packet_socket_async_send_data_block_t) (OFData *_Nonnull data, id _Nullable exception)

A block which is called when a packet has been sent.

Parameters
dataThe data which was sent
exceptionAn exception which occurred while reading or nil on success
Returns
The data to repeat the send with or nil if it should not repeat