ObjFW
Classes | Typedefs
OFStreamSocket.h File Reference
#import "OFStream.h"
#import "OFSocket.h"

Go to the source code of this file.

Classes

class  OFStreamSocket
 A class which provides methods to create and use stream sockets. More...
 

Typedefs

typedef bool(^ OFStreamSocketAsyncAcceptBlock) (OFStreamSocket *acceptedSocket, id exception)
 A block which is called when the socket accepted a connection. More...
 
typedef bool(^ OFStreamSocketAcceptedHandler) (OFStreamSocket *socket, OFStreamSocket *acceptedSocket, id exception)
 A handler which is called when the socket accepted a connection. More...
 

Typedef Documentation

◆ OFStreamSocketAcceptedHandler

typedef bool(^ OFStreamSocketAcceptedHandler) (OFStreamSocket *socket, OFStreamSocket *acceptedSocket, id exception)

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

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

◆ OFStreamSocketAsyncAcceptBlock

typedef bool(^ OFStreamSocketAsyncAcceptBlock) (OFStreamSocket *acceptedSocket, id exception)

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

Deprecated:
Use OFStreamSocketAcceptedHandler instead.
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