Fawkes API  Fawkes Development Version

FireVision FUSE protocol server. More...

#include <>>

Inheritance diagram for firevision::FuseServer:

List of all members.

Public Member Functions

 FuseServer (unsigned short int port, fawkes::ThreadCollector *collector=0)
 Constructor.
virtual ~FuseServer ()
 Destructor.
virtual void add_connection (fawkes::StreamSocket *s) throw ()
 Add an incoming connection.
void connection_died (FuseServerClientThread *client) throw ()
 Connection died.
virtual void loop ()
 Code to execute in the thread.

Detailed Description

FireVision FUSE protocol server.

The FuseServer will open a StreamSocket and listen on it for incoming connections. For each connection a client thread is started that will process all requests issued by the client.

Author:
Tim Niemueller

Constructor & Destructor Documentation

firevision::FuseServer::FuseServer ( unsigned short int  port,
fawkes::ThreadCollector collector = 0 
)

Constructor.

Parameters:
portPort to listen on for incoming connections
collectoroptional thread collector

Definition at line 54 of file fuse_server.cpp.

References fawkes::ThreadCollector::add(), and fawkes::Thread::start().

firevision::FuseServer::~FuseServer ( ) [virtual]

Destructor.

Definition at line 69 of file fuse_server.cpp.

References fawkes::ThreadCollector::remove(), fawkes::Thread::cancel(), and fawkes::Thread::join().


Member Function Documentation

void firevision::FuseServer::add_connection ( fawkes::StreamSocket s) throw () [virtual]

Add an incoming connection.

This is called for instance by the NetworkAcceptorThread whenever a new connection has been accepted.

Parameters:
ssocket for new connection

Implements fawkes::NetworkIncomingConnectionHandler.

Definition at line 95 of file fuse_server.cpp.

References fawkes::Thread::start().

void firevision::FuseServer::connection_died ( FuseServerClientThread client) throw ()

Connection died.

Parameters:
clientclient whose connection died

Definition at line 111 of file fuse_server.cpp.

Referenced by firevision::FuseServerClientThread::send(), firevision::FuseServerClientThread::recv(), and firevision::FuseServerClientThread::loop().

void firevision::FuseServer::loop ( ) [virtual]

Code to execute in the thread.

Implement this method to hold the code you want to be executed continously. If you do not implement this method, the default is that the thread will exit. This is useful if you choose to only implement once().

Reimplemented from fawkes::Thread.

Definition at line 119 of file fuse_server.cpp.

References fawkes::LockList::lock(), fawkes::ThreadCollector::remove(), and fawkes::LockList::unlock().


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