#include <Bkmd.hpp>
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) |
| DB * | getDb () |
|
|
Default constructor. Connects to the bookmark database and creates the internal data structure to handle the different message types. |
|
|
Constructor to open the server on the specified port.
|
|
|
Destructor. Disconnect from the database and clean up the message type data structure. |
|
|
Add a new session. |
|
|
Get the DB connection. This can be used by the message handlers if they need access to the database. |
|
|
Open a listening socket on the specified port. |
|
|
Check for new connections and accept them. Add a session for every new connection. |
|
||||||||||||||||
|
Process an incoming message. Calls the correct message handler for the message. |
1.2.12 written by Dimitri van Heesch,
© 1997-2001