Faith::ServerSocket Class Reference

#include <faith/serversocket.h>

Inheritance diagram for Faith::ServerSocket:

Faith::Object List of all members.

Public Slots

void close ()


virtual void newConnection (int fd)

Public Member Functions

 ServerSocket (const Faith::String &address, int port, Object *parent=0)
 ServerSocket (int port, Object *parent=0)
 ~ServerSocket ()
Socket::SocketError error () const
void setAddress (const Faith::String &address, int port)
bool listen ()

Constructor & Destructor Documentation

Faith::ServerSocket::ServerSocket ( const Faith::String address,
int  port,
Object parent = 0 

makes a socket that can accept connections on address and port

Faith::ServerSocket::ServerSocket ( int  port,
Object parent = 0 

makes a socket that can accept connections port on any address

Faith::ServerSocket::~ServerSocket (  ) 

Member Function Documentation

void Faith::ServerSocket::close (  )  [slot]

stop accepting connections

Socket::SocketError Faith::ServerSocket::error (  )  const [inline]

the error state. If there is no error, returns NoError

bool Faith::ServerSocket::listen (  ) 

Begin accepting connections

virtual void Faith::ServerSocket::newConnection ( int  fd  )  [virtual, signal]

emitted when there is a new connection. The file descriptor is fd which can be passed to Socket's constructor

You may also reimplement this virtual method

void Faith::ServerSocket::setAddress ( const Faith::String address,
int  port 

sets the address to listen on, if not set by the constructor. passing an empty string for address will cause the socket to listen on all addresses

The documentation for this class was generated from the following file:
Generated on Fri Sep 1 00:23:09 2006 for Faith by  doxygen 1.4.7