summaryrefslogtreecommitdiff
path: root/src/bitz/manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bitz/manager.h')
-rw-r--r--src/bitz/manager.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/bitz/manager.h b/src/bitz/manager.h
index cc15f9c..ce49e9e 100644
--- a/src/bitz/manager.h
+++ b/src/bitz/manager.h
@@ -20,8 +20,8 @@
#ifndef BITZ_MANAGER_H
#define BITZ_MANAGER_H
-#include <unistd.h> // pid_t, fork() etc.
-#include <socket/socket.h> // socket-library
+#include <unistd.h>
+#include <psocksxx/tcpnsockstream.h>
#include "manager_exception.h"
#include "worker.h"
@@ -50,10 +50,11 @@ namespace bitz {
bool worker;
unsigned int max_workers;
unsigned int max_worker_requests;
+ unsigned int comm_timeout;
unsigned int workers_count;
unsigned int worker_id;
- socketlibrary::TCPServerSocket * socket;
+ psocksxx::tcpnsockstream * socket;
worker_pool_t * worker_pool;
};
@@ -61,14 +62,17 @@ namespace bitz {
/**
* Note: backlog = SOMAXCONN (from sys/socket.h)
*/
- Manager( unsigned short port, const std::string &address = "", int backlog = 128 ) throw( ManagerException );
+ Manager( unsigned short port, const std::string &address = "0.0.0.0", int backlog = 128 ) throw( ManagerException );
/**
* deconstructor
*/
virtual ~Manager();
- virtual void spawn( unsigned int max_workers = BITZ_MAX_WORKERS, unsigned int max_worker_requests = BITZ_MAX_WORKER_REQUESTS ) throw( ManagerException );
+ virtual void spawn( unsigned int max_workers = BITZ_MAX_WORKERS,
+ unsigned int max_worker_requests = BITZ_MAX_WORKER_REQUESTS,
+ unsigned int comm_timeout = 0 ) throw( ManagerException );
+
virtual void shutdown( bool graceful = true ) throw();
virtual void reap_worker( pid_t worker_pid ) throw();
virtual void manager_workers() throw();