FireVision FUSE protocol server. More...
#include <>>
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 () |
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.
Definition at line 43 of file fuse_server.h.
firevision::FuseServer::FuseServer | ( | unsigned short int | port, | |
fawkes::ThreadCollector * | collector = 0 | |||
) |
Constructor.
port | Port to listen on for incoming connections | |
collector | optional 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::Thread::cancel(), fawkes::Thread::join(), and fawkes::ThreadCollector::remove().
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.
s | socket 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.
client | client whose connection died |
Definition at line 111 of file fuse_server.cpp.
Referenced by firevision::FuseServerClientThread::loop(), firevision::FuseServerClientThread::recv(), and firevision::FuseServerClientThread::send().