IBR-DTNSuite  0.8
ibrcommon::tcpserver Class Reference

#include <tcpserver.h>

List of all members.

Public Member Functions

 tcpserver ()
 tcpserver (const ibrcommon::File &socket)
void bind (const vinterface &net, int port, bool reuseaddr=true)
void bind (int port, bool reuseaddr=true)
void listen (int connections)
virtual ~tcpserver ()
tcpstreamaccept ()
void close ()
void shutdown ()

Detailed Description

Definition at line 20 of file tcpserver.h.


Constructor & Destructor Documentation

creates a tcpserver with no bound socket

Returns:

Definition at line 17 of file tcpserver.cpp.

creates a tcpserver bound to a filesocket

Parameters:
socket
Returns:

Definition at line 22 of file tcpserver.cpp.

References ibrcommon::vsocket::bind(), and listen().

Here is the call graph for this function:

Destructor

Definition at line 76 of file tcpserver.cpp.

References close().

Here is the call graph for this function:


Member Function Documentation

Accept a new connection.

Returns:
A socket for the connection.

Definition at line 91 of file tcpserver.cpp.

References close(), and ibrcommon::vsocket::select().

Referenced by dtn::api::ApiServer::componentRun().

Here is the call graph for this function:

void ibrcommon::tcpserver::bind ( const vinterface net,
int  port,
bool  reuseaddr = true 
)
Parameters:
addressthe address to listen to
portthe port to listen to

Definition at line 55 of file tcpserver.cpp.

References ibrcommon::vsocket::bind(), ibrcommon::vsocket::listen(), ibrcommon::vsocket::set(), ibrcommon::vsocket::VSOCKET_LINGER, ibrcommon::vsocket::VSOCKET_NONBLOCKING, and ibrcommon::vsocket::VSOCKET_REUSEADDR.

Referenced by dtn::api::ApiServer::ApiServer().

Here is the call graph for this function:

void ibrcommon::tcpserver::bind ( int  port,
bool  reuseaddr = true 
)
Parameters:
portthe port to listen to

Definition at line 36 of file tcpserver.cpp.

References ibrcommon::vsocket::bind(), ibrcommon::vsocket::listen(), ibrcommon::vsocket::set(), ibrcommon::vsocket::VSOCKET_LINGER, ibrcommon::vsocket::VSOCKET_NONBLOCKING, and ibrcommon::vsocket::VSOCKET_REUSEADDR.

Here is the call graph for this function:

Definition at line 81 of file tcpserver.cpp.

References ibrcommon::vsocket::close().

Referenced by accept(), dtn::api::ApiServer::componentDown(), and ~tcpserver().

Here is the call graph for this function:

void ibrcommon::tcpserver::listen ( int  connections)

listen on all sockets bound to

Parameters:
connections

Definition at line 31 of file tcpserver.cpp.

References ibrcommon::vsocket::listen().

Referenced by dtn::api::ApiServer::componentUp(), and tcpserver().

Here is the call graph for this function:

Definition at line 86 of file tcpserver.cpp.

References ibrcommon::vsocket::shutdown().

Referenced by dtn::api::ApiServer::__cancellation().

Here is the call graph for this function:


The documentation for this class was generated from the following files: