dtn::APIServer Class Reference

#include <APIServer.h>

Inheritance diagram for dtn::APIServer:

oasys::TCPServerThread oasys::TCPServer oasys::Thread oasys::IPSocket oasys::Logger oasys::IOHandlerBase List of all members.

Detailed Description

Class that implements the main server side handling of the DTN application IPC.

Definition at line 38 of file APIServer.h.

Public Member Functions

 APIServer ()
 The constructor checks for environment variable overrides of the address / port.
void accepted (int fd, in_addr_t addr, u_int16_t port)
 Virtual callback hook that gets called when new connections arrive.
in_addr_t local_addr () const
in_addr_t * local_addr_ptr ()
u_int16_t local_port () const
u_int16_t * local_port_ptr ()

Private Attributes

in_addr_t local_addr_
 local address to bind to
u_int16_t local_port_
 local port to use for api


Constructor & Destructor Documentation

dtn::APIServer::APIServer (  ) 

The constructor checks for environment variable overrides of the address / port.

It is expected that someone else will call bind_listen_start() on the APIServer instance.

Definition at line 75 of file APIServer.cc.

References DTN_IPC_PORT, end, oasys::TclCommandInterp::instance(), intoa, local_addr_, local_port_, log_debug, and log_err.


Member Function Documentation

void dtn::APIServer::accepted ( int  fd,
in_addr_t  addr,
u_int16_t  port 
) [virtual]

Virtual callback hook that gets called when new connections arrive.

Implements oasys::TCPServerThread.

Definition at line 125 of file APIServer.cc.

References oasys::Thread::start().

in_addr_t dtn::APIServer::local_addr (  )  const [inline]

Definition at line 50 of file APIServer.h.

References local_addr_.

Referenced by dtn::DTND::main().

in_addr_t* dtn::APIServer::local_addr_ptr (  )  [inline]

Definition at line 51 of file APIServer.h.

References local_addr_.

Referenced by dtn::APICommand::APICommand().

u_int16_t dtn::APIServer::local_port (  )  const [inline]

Definition at line 53 of file APIServer.h.

References local_port_.

Referenced by dtn::DTND::main().

u_int16_t* dtn::APIServer::local_port_ptr (  )  [inline]

Definition at line 54 of file APIServer.h.

References local_port_.

Referenced by dtn::APICommand::APICommand().


Member Data Documentation

in_addr_t dtn::APIServer::local_addr_ [private]

local address to bind to

Reimplemented from oasys::IPSocket.

Definition at line 57 of file APIServer.h.

Referenced by APIServer(), local_addr(), and local_addr_ptr().

u_int16_t dtn::APIServer::local_port_ [private]

local port to use for api

Reimplemented from oasys::IPSocket.

Definition at line 58 of file APIServer.h.

Referenced by APIServer(), local_port(), and local_port_ptr().


The documentation for this class was generated from the following files:
Generated on Thu Jun 7 12:54:32 2007 for DTN Reference Implementation by  doxygen 1.5.1