Samchon Framework for CPP  1.0.0
ExternalClientArray.hpp
1 #pragma once
2 #include <samchon/API.hpp>
3 
4 #include <samchon/protocol/ExternalSystemArray.hpp>
5 #include <samchon/protocol/IServer.hpp>
6 
7 namespace samchon
8 {
9 namespace protocol
10 {
20  class SAMCHON_FRAMEWORK_API ExternalClientArray
21  : public virtual ExternalSystemArray,
22  private virtual IServer
23  {
24  protected:
25  typedef ExternalSystemArray super;
26 
30  std::string myIP;
31 
35  int port;
36 
37  public:
38  /* ------------------------------------------------------------------
39  CONSTRUCTORS
40  ------------------------------------------------------------------ */
45  virtual ~ExternalClientArray() = default;
46 
47  virtual void construct(std::shared_ptr<library::XML>) override;
48 
49  virtual void start() override;
50 
51  protected:
52  /* ------------------------------------------------------------------
53  ISERVER METHODS
54  ------------------------------------------------------------------ */
55  virtual auto PORT() const -> int;
56  virtual auto MY_IP() const->std::string;
57 
58  virtual void addClient(Socket*) override;
59 
60  public:
61  /* ------------------------------------------------------------------
62  EXPORTERS
63  ------------------------------------------------------------------ */
64  virtual auto toXML() const->std::shared_ptr<library::XML> override;
65  };
66 };
67 };
An interface of a physical server.
Definition: IServer.hpp:43
An array of ExternalSystem(s).
Definition: RWMutex.hpp:4
int port
A port number for accepting external clients.
std::string myIP
A custom ip address of my system to bind.
Top level namespace of products built from samchon.
Definition: ByteArray.hpp:7