|
Samchon Framework for CPP
1.0.0
|
A web-socket server connector. More...
#include <WebServerConnector.hpp>

Public Member Functions | |
| WebServerConnector () | |
| Default Constructor. More... | |
| virtual void | connect () override |
| Connect to a server following web-socket protoocol. More... | |
Public Member Functions inherited from samchon::protocol::ServerConnector | |
| ServerConnector () | |
| Default Constructor. More... | |
| virtual auto | getIP () const -> std::string=0 |
| Destinatio IP. More... | |
| virtual auto | getPort () const -> int=0 |
| Destination port. More... | |
| virtual auto | getMyIP () const -> std::string |
| (optional) My IP, if you want to bind More... | |
Public Member Functions inherited from samchon::protocol::IClient | |
| IClient () | |
| Default Constructor. More... | |
Public Member Functions inherited from samchon::protocol::IProtocol | |
| IProtocol () | |
| Default Constructor. More... | |
| virtual void | replyData (std::shared_ptr< Invoke >) |
| Reply a message. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from samchon::protocol::IClient | |
| virtual auto | BUFFER_SIZE () const -> size_t |
| Buffer size of network I/O. More... | |
| virtual void | _replyData (std::shared_ptr< Invoke >) |
| A method for pre-processing replied Invoke message. More... | |
Protected Attributes inherited from samchon::protocol::ServerConnector | |
| boost::asio::io_service * | ioService |
| An io_service of Boost.Asio's own. More... | |
| EndPoint * | endPoint |
| An endpoint directing a server. More... | |
| EndPoint * | localEndPoint |
| (Optional) An local endpoint of the client (my system) More... | |
Protected Attributes inherited from samchon::protocol::IClient | |
| Socket * | socket |
| Socket for network I/O. More... | |
| std::mutex * | sendMtx |
| A mutex for sending message. More... | |
A web-socket server connector.
WebServerConnector is a ServerConnector following web-socket protocol.
ServerConnector is a class for a physical client connecting a server. If you want to connect to a server, then implements this ServerConnector and just override some methods like getIP(), getPort() and replyData(). That's all.
In Samchon Framework, package protocol, There are basic 3 + 1 components that can make any type of network system in Samchon Framework. The basic 3 components are IProtocol, IServer and IClient. The last, surplus one is the ServerConnector. Looking around classes in Samchon Framework, especially module master and slave which are designed for realizing distributed processing systems and parallel processing systems, physical client classes are all derived from this ServerConnector.
Definition at line 20 of file WebServerConnector.hpp.
| WebServerConnector::WebServerConnector | ( | ) |
Default Constructor.
Definition at line 10 of file WebServerConnector.cpp.
|
overridevirtual |
Connect to a server following web-socket protoocol.
Reimplemented from samchon::protocol::ServerConnector.
Definition at line 15 of file WebServerConnector.cpp.
References samchon::protocol::ServerConnector::connect().
