Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
server_handler.hh
Go to the documentation of this file.
1 #pragma once
2 #include "netobserver.hh"
3 
4 namespace eclipse {
5 namespace network {
6 
7 class ServerHandler {
8  public:
9  ServerHandler(uint32_t port);
10  ~ServerHandler() = default;
11  void attach(NetObserver*);
12 
14  bool establish();
15  bool close();
16 
17  private:
18  NetObserver* node;
19  uint32_t port;
20 };
21 
22 }
23 } /* eclipse */
Definition: netobserver.hh:9
Definition: server_handler.hh:7
void attach(NetObserver *)
Definition: server_handler.cc:59
bool close()
Definition: server_handler.cc:54
bool establish()
It will start the accepting loop.
Definition: server_handler.cc:23
ServerHandler(uint32_t port)
Definition: server_handler.cc:17