ObjFW
Classes | Typedefs
OFSequencedPacketSocket.h File Reference
#import "OFObject.h"
#import "OFKernelEventObserver.h"
#import "OFRunLoop.h"
#import "OFSocket.h"

Go to the source code of this file.

Classes

class  OFSequencedPacketSocket
 A base class for sequenced packet sockets. More...
 

Typedefs

typedef bool(^ OFSequencedPacketSocketAsyncReceiveBlock) (size_t length, id exception)
 A block which is called when a packet has been received. More...
 
typedef OFData *(^ OFSequencedPacketSocketAsyncSendDataBlock) (id exception)
 A block which is called when a packet has been sent. More...
 
typedef bool(^ OFSequencedPacketSocketAsyncAcceptBlock) (OFSequencedPacketSocket *acceptedSocket, id exception)
 A block which is called when the socket accepted a connection. More...
 

Typedef Documentation

◆ OFSequencedPacketSocketAsyncAcceptBlock

typedef bool(^ OFSequencedPacketSocketAsyncAcceptBlock) (OFSequencedPacketSocket *acceptedSocket, id 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

◆ OFSequencedPacketSocketAsyncReceiveBlock

typedef bool(^ OFSequencedPacketSocketAsyncReceiveBlock) (size_t length, id 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

◆ OFSequencedPacketSocketAsyncSendDataBlock

typedef OFData*(^ OFSequencedPacketSocketAsyncSendDataBlock) (id exception)

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

Parameters
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