20 #ifndef BITZ_MANAGER_H
21 #define BITZ_MANAGER_H
24 #include <socket/socket.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 workers_count;
54 unsigned int worker_id;
71 virtual
void spawn(
unsigned int max_workers = BITZ_MAX_WORKERS,
unsigned int max_worker_requests = BITZ_MAX_WORKER_REQUESTS ) throw( ManagerException );
72 virtual
void shutdown(
bool graceful = true ) throw();
73 virtual
void reap_worker( pid_t worker_pid ) throw();
74 virtual
void manager_workers() throw();
80 virtual
void spawn_worker(
unsigned int worker_id ) throw( ManagerException );
Manager(unsigned short port, const std::string &address="", int backlog=128)
Definition: manager.cpp:31
Definition: manager_exception.h:27