Public Member Functions

ibrcommon::tcpserver Class Reference

#include <tcpserver.h>

Collaboration diagram for ibrcommon::tcpserver:
Collaboration graph
[legend]

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

ibrcommon::tcpserver::tcpserver (  ) 

creates a tcpserver with no bound socket

Returns:

Definition at line 16 of file tcpserver.cpp.

ibrcommon::tcpserver::tcpserver ( const ibrcommon::File socket  ) 

creates a tcpserver bound to a filesocket

Parameters:
socket 
Returns:

Definition at line 21 of file tcpserver.cpp.

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

Here is the call graph for this function:

ibrcommon::tcpserver::~tcpserver (  )  [virtual]

Destructor

Definition at line 75 of file tcpserver.cpp.

References close().

Here is the call graph for this function:


Member Function Documentation

tcpstream * ibrcommon::tcpserver::accept (  ) 

Accept a new connection.

Returns:
A socket for the connection.

Definition at line 90 of file tcpserver.cpp.

References ibrcommon::select().

Referenced by dtn::net::TCPConvergenceLayer::componentRun().

Here is the call graph for this function:

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

Definition at line 54 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::net::TCPConvergenceLayer::bind(), and dtn::daemon::ApiServer::~ApiServer().

Here is the call graph for this function:

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

Definition at line 35 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:

void ibrcommon::tcpserver::close (  ) 

Definition at line 80 of file tcpserver.cpp.

References ibrcommon::vsocket::close().

Referenced by dtn::net::TCPConvergenceLayer::__cancellation(), dtn::net::TCPConvergenceLayer::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 30 of file tcpserver.cpp.

References ibrcommon::vsocket::listen().

Referenced by dtn::net::TCPConvergenceLayer::componentUp(), and tcpserver().

Here is the call graph for this function:

void ibrcommon::tcpserver::shutdown (  ) 

Definition at line 85 of file tcpserver.cpp.

References ibrcommon::vsocket::shutdown().

Referenced by dtn::net::TCPConvergenceLayer::__cancellation(), and dtn::net::TCPConvergenceLayer::componentDown().

Here is the call graph for this function:


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