7 |
|
#ifndef _Daemon_hpp_ |
8 |
|
#define _Daemon_hpp_ |
9 |
|
|
10 |
< |
#include "Smersh.hpp" |
10 |
> |
#include <menes-api/socket.hpp> |
11 |
> |
|
12 |
> |
#include "Person.hpp" |
13 |
|
|
14 |
|
class Daemon |
15 |
|
{ |
16 |
|
private: |
17 |
|
int port; |
18 |
+ |
virtual void handle(); |
19 |
|
protected: |
20 |
+ |
Daemon(int port) : port(port) {} |
21 |
+ |
void serve(bool fork, Daemon* self); |
22 |
|
public: |
23 |
< |
Daemon(int port); |
24 |
< |
virtual ~Daemon(); |
23 |
> |
Daemon(int port, bool fork) : port(port) { serve(fork, this); } |
24 |
> |
virtual ~Daemon() {} |
25 |
|
}; |
26 |
|
|
27 |
|
#endif // _Daemon_hpp_ |