20 #ifndef BITZ_MANAGER_H 21 #define BITZ_MANAGER_H 24 #include <psocksxx/tcpnsockstream.h> 26 #include "manager_exception.h" 29 #ifndef BITZ_MAX_WORKERS 30 #define BITZ_MAX_WORKERS 2 33 #ifndef BITZ_MAX_WORKER_REQUESTS 34 #define BITZ_MAX_WORKER_REQUESTS 100 45 unsigned int worker_id;
51 unsigned int max_workers;
52 unsigned int max_worker_requests;
53 unsigned int comm_timeout;
54 unsigned int workers_count;
55 unsigned int worker_id;
57 psocksxx::tcpnsockstream * socket;
65 Manager(
unsigned short port,
const std::string &address =
"0.0.0.0",
int backlog = 128 )
throw(
ManagerException );
72 virtual void spawn(
unsigned int max_workers = BITZ_MAX_WORKERS,
73 unsigned int max_worker_requests = BITZ_MAX_WORKER_REQUESTS,
76 virtual void shutdown(
bool graceful =
true )
throw();
77 virtual void reap_worker( pid_t worker_pid )
throw();
78 virtual void manager_workers()
throw();
84 virtual void spawn_worker(
unsigned int worker_id )
throw(
ManagerException );
virtual ~Manager()
Definition: manager.cpp:64
Definition: manager_exception.h:27
Manager(unsigned short port, const std::string &address="0.0.0.0", int backlog=128)
Definition: manager.cpp:31