Fawkes API
Fawkes Development Version
fuse_server.h
1
2
/***************************************************************************
3
* fuse_server.h - network image transport server interface
4
*
5
* Generated: Mon Jan 09 15:26:27 2006
6
* Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version. A runtime exception applies to
14
* this software (see LICENSE.GPL_WRE file mentioned below for details).
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Library General Public License for more details.
20
*
21
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22
*/
23
24
#ifndef _FIREVISION_FVUTILS_NET_FUSE_SERVER_H_
25
#define _FIREVISION_FVUTILS_NET_FUSE_SERVER_H_
26
27
#include <core/threading/thread.h>
28
#include <core/utils/lock_list.h>
29
#include <netcomm/utils/incoming_connection_handler.h>
30
31
#include <string>
32
#include <vector>
33
34
namespace
fawkes
{
35
class
ThreadCollector;
36
class
StreamSocket;
37
class
NetworkAcceptorThread;
38
}
// namespace fawkes
39
namespace
firevision {
40
41
class
FuseServerClientThread;
42
43
class
FuseServer
:
public
fawkes::Thread
,
public
fawkes::NetworkIncomingConnectionHandler
44
{
45
public
:
46
FuseServer
(
bool
enable_ipv4,
47
bool
enable_ipv6,
48
const
std::string & listen_ipv4,
49
const
std::string & listen_ipv6,
50
unsigned
short
int
port,
51
fawkes::ThreadCollector
*collector = 0);
52
virtual
~FuseServer
();
53
54
virtual
void
add_connection
(
fawkes::StreamSocket
*s)
throw
();
55
void
connection_died
(
FuseServerClientThread
*client)
throw
();
56
57
virtual
void
loop
();
58
59
private
:
60
std::vector<fawkes::NetworkAcceptorThread *> acceptor_threads_;
61
62
fawkes::LockList<FuseServerClientThread *>
clients_;
63
fawkes::LockList<FuseServerClientThread *>::iterator
cit_;
64
65
fawkes::LockList<FuseServerClientThread *>
dead_clients_;
66
67
fawkes::ThreadCollector
*thread_collector_;
68
};
69
70
}
// end namespace firevision
71
72
#endif
fawkes::ThreadCollector
Definition:
thread_collector.h:40
firevision::FuseServer::FuseServer
FuseServer(bool enable_ipv4, bool enable_ipv6, const std::string &listen_ipv4, const std::string &listen_ipv6, unsigned short int port, fawkes::ThreadCollector *collector=0)
Constructor.
Definition:
fuse_server.cpp:56
firevision::FuseServer::loop
virtual void loop()
Code to execute in the thread.
Definition:
fuse_server.cpp:135
firevision::FuseServer
Definition:
fuse_server.h:43
firevision::FuseServer::add_connection
virtual void add_connection(fawkes::StreamSocket *s)
Definition:
fuse_server.cpp:113
fawkes::LockList
Definition:
thread.h:43
fawkes
firevision::FuseServer::connection_died
void connection_died(FuseServerClientThread *client)
Connection died.
Definition:
fuse_server.cpp:128
firevision::FuseServerClientThread
Definition:
fuse_server_client_thread.h:44
fawkes::Thread
Definition:
thread.h:45
fawkes::NetworkIncomingConnectionHandler
Definition:
incoming_connection_handler.h:37
firevision::FuseServer::~FuseServer
virtual ~FuseServer()
Destructor.
Definition:
fuse_server.cpp:86
fawkes::StreamSocket
Definition:
stream.h:37
src
libs
fvutils
net
fuse_server.h
Generated by
1.8.17