Samchon Framework for CPP  1.0.0
ServerConnector.hpp
1 #pragma once
2 #include <samchon/API.hpp>
3 
4 #include <samchon/protocol/IClient.hpp>
5 
6 #include <string>
7 
8 namespace samchon
9 {
10 namespace protocol
11 {
32  class SAMCHON_FRAMEWORK_API ServerConnector
33  : public virtual IClient
34  {
35  protected:
36  typedef IClient super;
37 
41  boost::asio::io_service *ioService;
42 
46  EndPoint *endPoint;
47 
55  EndPoint *localEndPoint;
56 
57  public:
58  /* -----------------------------------------------------------
59  CONSTRUCTORS
60  ----------------------------------------------------------- */
65  virtual ~ServerConnector();
66 
67  /* -----------------------------------------------------------
68  GETTERS
69  ----------------------------------------------------------- */
73  virtual auto getIP() const->std::string = 0;
74 
78  virtual auto getPort() const -> int = 0;
79 
83  virtual auto getMyIP() const->std::string;
84 
85  /* -----------------------------------------------------------
86  CONNECTOR
87  ----------------------------------------------------------- */
97  virtual void connect();
98  };
99 };
100 };
Definition: RWMutex.hpp:4
boost::asio::io_service * ioService
An io_service of Boost.Asio&#39;s own.
An interface for a client.
Definition: IClient.hpp:53
EndPoint * endPoint
An endpoint directing a server.
EndPoint * localEndPoint
(Optional) An local endpoint of the client (my system)
Top level namespace of products built from samchon.
Definition: ByteArray.hpp:7
A server connector for a physical client.