#include <TcpServer.h>
Inherits Socket.
Inheritance diagram for TcpServer:


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 |
Definition at line 25 of file TcpServer.h.
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.
| 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 * | ||||
| ) |
friend class Poller [friend] |
String TcpServer::_service [private] |
Definition at line 44 of file TcpServer.h.
struct sockaddr_in TcpServer::_addr [private] |
1.5.1