ObjFW
Loading...
Searching...
No Matches
Classes | Typedefs
OFDatagramSocket.h File Reference
import "OFObject.h"
import "OFKernelEventObserver.h"
import "OFRunLoop.h"
import "OFSocket.h"

Go to the source code of this file.

Classes

protocol  <OFDatagramSocketDelegate>
 A delegate for OFDatagramSocket. More...
 
class  OFDatagramSocket
 A base class for datagram sockets. More...
 

Typedefs

typedef bool(^ OFDatagramSocketAsyncReceiveBlock) (size_t length, const OFSocketAddress *sender, id exception)
 A block which is called when a packet has been received.
 
typedef OFData *(^ OFDatagramSocketAsyncSendDataBlock) (id exception)
 A block which is called when a packet has been sent.
 

Typedef Documentation

◆ OFDatagramSocketAsyncReceiveBlock

typedef bool(^ OFDatagramSocketAsyncReceiveBlock) (size_t length, const OFSocketAddress *sender, id exception)

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

Parameters
lengthThe length of the packet
senderThe address of the sender 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

◆ OFDatagramSocketAsyncSendDataBlock

typedef OFData *(^ OFDatagramSocketAsyncSendDataBlock) (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