#include <TCPServer.h>
Inheritance diagram for oasys::TCPServer:
Definition at line 31 of file TCPServer.h.
Public Member Functions | |
TCPServer (const char *logbase="/oasys/tcpserver") | |
int | timeout_accept (int *fd, in_addr_t *addr, u_int16_t *port, int timeout_ms) |
Try to accept a new connection, but don't block for more than the timeout milliseconds. | |
int | listen () |
System call wrapper. | |
int | accept (int *fd, in_addr_t *addr, u_int16_t *port) |
System call wrapper. |
oasys::TCPServer::TCPServer | ( | const char * | logbase = "/oasys/tcpserver" |
) |
Definition at line 31 of file TCPServer.cc.
References oasys::IPSocket::params_, and oasys::IPSocket::ip_socket_params::reuseaddr_.
int oasys::TCPServer::listen | ( | ) |
System call wrapper.
Definition at line 38 of file TCPServer.cc.
References ASSERT, errno, oasys::IPSocket::fd_, oasys::IPSocket::LISTENING, oasys::LOG_DEBUG, oasys::LOG_ERR, oasys::Logger::logf(), and oasys::IPSocket::set_state().
Referenced by oasys::TCPServerThread::bind_listen_start(), and dtn::TCPConvergenceLayer::interface_up().
int oasys::TCPServer::accept | ( | int * | fd, | |
in_addr_t * | addr, | |||
u_int16_t * | port | |||
) |
System call wrapper.
Definition at line 53 of file TCPServer.cc.
References oasys::IO::ACCEPT, errno, oasys::IPSocket::fd_, oasys::IPSocket::LISTENING, oasys::LOG_ERR, oasys::Logger::logf(), oasys::IOHandlerBase::monitor(), oasys::IPSocket::state_, and oasys::IPSocket::statetoa().
Referenced by oasys::TCPServerThread::run(), and timeout_accept().
int oasys::TCPServer::timeout_accept | ( | int * | fd, | |
in_addr_t * | addr, | |||
u_int16_t * | port, | |||
int | timeout_ms | |||
) |
Try to accept a new connection, but don't block for more than the timeout milliseconds.
Definition at line 78 of file TCPServer.cc.
References oasys::IO::ACCEPT, accept(), ASSERT, oasys::IOERROR, oasys::IOHandlerBase::monitor(), and oasys::IPSocket::poll_sockfd().
Referenced by oasys::TCPServerThread::run().