A class which provides functions to create and use TCP sockets. More...
#import <OFTCPSocket.h>
Public Member Functions | |
(id) | - connectToService:onNode: |
(id) | - bindService:onNode:withFamily: |
(id) | - listenWithBackLog: |
(id) | - listen |
(OFTCPSocket *) | - accept |
(id) | - enableKeepAlives: |
Protected Attributes | |
struct sockaddr * | saddr |
socklen_t | saddr_len |
A class which provides functions to create and use TCP sockets.
- (OFTCPSocket *) accept |
Accept an incoming connection.
Bind socket on the specified node and service.
service | The service to bind | |
node | The node to bind to | |
family | The family to use (AF_INET or AF_INET6) |
Connect the OFTCPSocket to the specified destination.
service | The service on the node to connect to | |
node | The node to connect to |
- (id) enableKeepAlives: | (BOOL) | enable |
Enable or disable keep alives for the connection.
- (id) listen |
Listen on the socket.
- (id) listenWithBackLog: | (int) | backlog |
Listen on the socket.
backlog | Maximum length for the queue of pending connections. |