FuseServer Class Reference
[FireVision FUSE Network Protocol, FireVision Image Processing Framework and Applications]
FireVision FUSE protocol server.
More...
#include <fvutils/net/fuse_server.h>

Public Member Functions | |
| FuseServer (unsigned short int port, fawkes::ThreadCollector *collector=NULL) | |
| 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.
Definition at line 38 of file fuse_server.h.
Constructor & Destructor Documentation
| FuseServer::FuseServer | ( | unsigned short int | port, | |
| fawkes::ThreadCollector * | collector = NULL | |||
| ) |
Constructor.
- Parameters:
-
port Port to listen on for incoming connections collector optional thread collector
Definition at line 49 of file fuse_server.cpp.
References fawkes::ThreadCollector::add(), and fawkes::Thread::start().
| FuseServer::~FuseServer | ( | ) | [virtual] |
Destructor.
Definition at line 64 of file fuse_server.cpp.
References fawkes::Thread::cancel(), fawkes::Thread::join(), and fawkes::ThreadCollector::remove().
Member Function Documentation
| void 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:
-
s socket for new connection
Implements fawkes::NetworkIncomingConnectionHandler.
Definition at line 90 of file fuse_server.cpp.
References fawkes::Thread::start().
| void FuseServer::connection_died | ( | FuseServerClientThread * | client | ) | throw () |
Connection died.
- Parameters:
-
client client whose connection died
Definition at line 106 of file fuse_server.cpp.
Referenced by FuseServerClientThread::loop(), FuseServerClientThread::recv(), and FuseServerClientThread::send().
| void 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 114 of file fuse_server.cpp.
References fawkes::LockList< Type >::lock(), fawkes::ThreadCollector::remove(), and fawkes::LockList< Type >::unlock().
The documentation for this class was generated from the following files:
- src/firevision/fvutils/net/fuse_server.h
- src/firevision/fvutils/net/fuse_server.cpp

