Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

Bkmd Class Reference

#include <Bkmd.hpp>

List of all members.

Public Methods

 Bkmd ()
 Bkmd (unsigned short port)
 ~Bkmd ()
void listen (unsigned short port)
void poll ()
void addSession (Session *session)
void processMsg (string data, msgHeader1 &header, Session *conn)
DBgetDb ()


Detailed Description

The server class. Provides the listening socket and the session handling of the server.


Constructor & Destructor Documentation

Bkmd::Bkmd  
 

Default constructor. Connects to the bookmark database and creates the internal data structure to handle the different message types.

Bkmd::Bkmd unsigned short    port
 

Constructor to open the server on the specified port.

Todo:
Really do something.

Bkmd::~Bkmd  
 

Destructor. Disconnect from the database and clean up the message type data structure.


Member Function Documentation

void Bkmd::addSession Session   session
 

Add a new session.

DB * Bkmd::getDb  
 

Get the DB connection. This can be used by the message handlers if they need access to the database.

void Bkmd::listen unsigned short    port
 

Open a listening socket on the specified port.

void Bkmd::poll  
 

Check for new connections and accept them. Add a session for every new connection.

void Bkmd::processMsg string    data,
msgHeader1   header,
Session   conn
 

Process an incoming message. Calls the correct message handler for the message.


The documentation for this class was generated from the following files:
Generated on Sun Jan 20 20:59:59 2002 for bkmd by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001