TcpServer Class Reference

#include <TcpServer.h>

Inherits Socket.

Inheritance diagram for TcpServer:

Inheritance graph
[legend]
Collaboration diagram for TcpServer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TcpServer (const String &bindAddress, const String &service)
virtual ~TcpServer ()
virtual int accept (TcpConnection **connection)
 SIGNAL (accepted, TcpConnection *)

Private Attributes

String _service
sockaddr_in _addr

Friends

class Poller

Detailed Description

Definition at line 25 of file TcpServer.h.


Constructor & Destructor Documentation

TcpServer::TcpServer ( const String bindAddress,
const String service 
)

Definition at line 18 of file TcpServer.cpp.

References _addr, Socket::_socket, CORE(), CSTRING(), ERROR, ERROR_BACKTRACE(), FAILED(), Support::failure(), Support::failureCode(), MSG_SOCKET_CANNOT_BIND, MSG_SOCKET_CANNOT_CREATE, MSG_SOCKET_CANNOT_LISTEN, MSG_SOCKET_CANNOT_SET_OPTION, Connection::setAddress(), Socket::socket(), and TCP_SERVER_CONNECTION_QUEUE_SIZE.

TcpServer::~TcpServer (  )  [virtual]

Definition at line 59 of file TcpServer.cpp.

References Socket::_socket, CORE(), ERROR, ERROR_BACKTRACE(), FAILED(), MSG_SOCKET_CANNOT_CLOSE, and MSG_SOCKET_CANNOT_SHUTDOWN.


Member Function Documentation

int TcpServer::accept ( TcpConnection **  connection  )  [virtual]

Definition at line 73 of file TcpServer.cpp.

References Socket::_socket, EMIT, ERROR, ERROR_BACKTRACE(), FAILED(), MSG_NULL_POINTER, MSG_OBJECT_CANNOT_CREATE, MSG_SOCKET_CANNOT_ACCEPT_CONNECTION, and OK.

Referenced by Poller::poll().

TcpServer::SIGNAL ( accepted  ,
TcpConnection  
)


Friends And Related Function Documentation

friend class Poller [friend]

Reimplemented from Socket.

Definition at line 28 of file TcpServer.h.


Member Data Documentation

String TcpServer::_service [private]

Definition at line 44 of file TcpServer.h.

struct sockaddr_in TcpServer::_addr [private]

Definition at line 45 of file TcpServer.h.

Referenced by TcpServer().


The documentation for this class was generated from the following files:
Generated on Thu Sep 6 20:14:00 2007 for Pylon Application Platform by  doxygen 1.5.1