ObjFW
Classes | Typedefs
OFTCPSocket.h File Reference
#import "OFStreamSocket.h"
#import "socket.h"

Go to the source code of this file.

Classes

class  OFTCPSocket
 A class which provides functions to create and use TCP sockets. More...
 

Typedefs

typedef void(^ of_tcp_socket_async_connect_block_t) (OFTCPSocket *socket, OFException *OF_NULLABLE exception)
 A block which is called when the socket connected. More...
 
typedef bool(^ of_tcp_socket_async_accept_block_t) (OFTCPSocket *socket, OFTCPSocket *acceptedSocket, OFException *OF_NULLABLE exception)
 A block which is called when the socket accepted a connection. More...
 

Typedef Documentation

typedef bool(^ of_tcp_socket_async_accept_block_t) (OFTCPSocket *socket, OFTCPSocket *acceptedSocket, OFException *OF_NULLABLE exception)

A block 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 block should be used for the next incoming connection
typedef void(^ of_tcp_socket_async_connect_block_t) (OFTCPSocket *socket, OFException *OF_NULLABLE exception)

A block which is called when the socket connected.

Parameters
socketThe socket which connected
exceptionAn exception which occurred while connecting the socket or nil on success