Samchon Framework for CPP  1.0.0
IServer.hpp
1 #pragma once
2 #include <samchon/API.hpp>
3 
4 #include <string>
5 #include <samchon/protocol/Socket.hpp>
6 
7 namespace samchon
8 {
9 namespace protocol
10 {
43  class SAMCHON_FRAMEWORK_API IServer
44  {
45  protected:
49  Acceptor *acceptor;
50 
54  virtual auto MY_IP() const->std::string;
55 
59  virtual auto PORT() const -> int = NULL;
60 
61  public:
65  IServer();
66  virtual ~IServer();
67 
73  virtual void open();
74 
78  virtual void close();
79 
80  protected:
84  virtual void addClient(Socket*) = 0; //ADD_CLIENT
85  };
86 };
87 };
An interface of a physical server.
Definition: IServer.hpp:43
Definition: RWMutex.hpp:4
Top level namespace of products built from samchon.
Definition: ByteArray.hpp:7
Acceptor * acceptor
An acceptor for clients.
Definition: IServer.hpp:49