OFTCPSocket Class Reference

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

#import <OFTCPSocket.h>

Inheritance diagram for OFTCPSocket:
OFSocket OFStream OFObject

List of all members.

Public Member Functions

(void) - connectToService:onNode:
(void) - bindService:onNode:withFamily:
(void) - listenWithBackLog:
(void) - listen
(OFTCPSocket *) - accept
(void) - setKeepAlivesEnabled:
(OFString *) - remoteAddress

Protected Attributes

struct sockaddr * sockAddr
socklen_t sockAddrLen

Detailed Description

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


Member Function Documentation

- (OFTCPSocket*) accept  

Accept an incoming connection.

Returns:
An autoreleased OFTCPSocket for the accepted connection.
- (void) bindService: (OFString *)  service
onNode: (OFString *)  node
withFamily: (int)  family 

Bind socket on the specified node and service.

Parameters:
service The service to bind
node The node to bind to
family The family to use (AF_INET for IPv4 or AF_INET6 for IPv6)
- (void) connectToService: (OFString *)  service
onNode: (OFString *)  node 

Connect the OFTCPSocket to the specified destination.

Parameters:
service The service on the node to connect to
node The node to connect to
- (void) listen  

Listen on the socket.

- (void) listenWithBackLog: (int)  backlog  

Listen on the socket.

Parameters:
backlog Maximum length for the queue of pending connections.
- (OFString*) remoteAddress  

Returns the remote address of the socket. Only works with accepted sockets!

Returns:
The remote address as a string.
- (void) setKeepAlivesEnabled: (BOOL)  enable  

Enable or disable keep alives for the connection.


The documentation for this class was generated from the following file:
 All Classes Functions Variables
Generated on Sun May 9 16:52:22 2010 for ObjFW by  doxygen 1.6.3