oasys::SMTPServer Class Reference

#include <SMTPServer.h>

Inheritance diagram for oasys::SMTPServer:

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

Detailed Description

Class to implement an SMTP server which creates a thread and an SMTPHandler (using the factory interface) per connection.

Definition at line 34 of file SMTPServer.h.

Public Member Functions

 SMTPServer (const SMTP::Config &config, SMTPHandlerFactory *handler_factory, Notifier *session_done=NULL, int accept_timeout=-1)

Private Member Functions

void accepted (int fd, in_addr_t addr, u_int16_t port)
 Virtual callback hook that gets called when new connections arrive.

Private Attributes

SMTP::Config config_
SMTPHandlerFactoryhandler_factory_
Notifiersession_done_


Constructor & Destructor Documentation

oasys::SMTPServer::SMTPServer ( const SMTP::Config config,
SMTPHandlerFactory handler_factory,
Notifier session_done = NULL,
int  accept_timeout = -1 
)

Definition at line 23 of file SMTPServer.cc.

References oasys::SMTP::Config::addr_, oasys::TCPServerThread::bind_listen_start(), intoa, oasys::Logger::logpathf(), and oasys::SMTP::Config::port_.


Member Function Documentation

void oasys::SMTPServer::accepted ( int  fd,
in_addr_t  addr,
u_int16_t  port 
) [private, virtual]

Virtual callback hook that gets called when new connections arrive.

Implements oasys::TCPServerThread.

Definition at line 38 of file SMTPServer.cc.

References config_, handler_factory_, oasys::SMTPHandlerFactory::new_handler(), session_done_, and oasys::Thread::start().


Member Data Documentation

SMTP::Config oasys::SMTPServer::config_ [private]

Definition at line 44 of file SMTPServer.h.

Referenced by accepted().

SMTPHandlerFactory* oasys::SMTPServer::handler_factory_ [private]

Definition at line 45 of file SMTPServer.h.

Referenced by accepted().

Notifier* oasys::SMTPServer::session_done_ [private]

Definition at line 46 of file SMTPServer.h.

Referenced by accepted().


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