Samchon Framework for CPP  1.0.0
SlaveServer.hpp
1 #pragma once
2 #include <samchon/API.hpp>
3 
4 #include <samchon/templates/slave/SlaveSystem.hpp>
5 #include <samchon/protocol/Server.hpp>
6 
7 #include <samchon/protocol/ClientDriver.hpp>
8 
9 namespace samchon
10 {
11 namespace templates
12 {
13 namespace slave
14 {
15  class SlaveServer
16  : public virtual SlaveSystem,
17  public virtual protocol::Server
18 
19  {
20  public:
21  SlaveServer()
22  : SlaveSystem(),
23  protocol::Server()
24  {
25  };
26  virtual ~SlaveServer() = default;
27 
28  protected:
29  virtual void addClient(std::shared_ptr<protocol::ClientDriver> driver) override
30  {
31  this->communicator_ = driver;
32  driver->listen(this);
33  };
34  };
35 };
36 };
37 };
virtual void addClient(std::shared_ptr< ClientDriver >)=0