Samchon Framework for CPP
1.0.0
|
#include <WebCommunicator.hpp>
Public Member Functions | |
virtual void | sendData (std::shared_ptr< Invoke > invoke) override |
Public Member Functions inherited from samchon::protocol::Communicator | |
virtual void | close () |
virtual void | replyData (std::shared_ptr< Invoke > invoke) |
A communicator following Web-socket protocol.
WebCommunicator is an abstract class who takes full charge of network communication with remote system, following Web-socket protocol. Type of the WebCommunicator is specified to WebServerConnector and WebClientDriver whether the remote system is a server (that my system is connecting to) or a client (a client conneting to to my server).
Whenever a replied message comes from the remote system, the message will be converted to an Invoke class and the Invoke object will be shifted to the listener's IProtocol.replyData() method.
Note that, one of this or remote system is web-browser based, then there's not any alternative choice. Web browser supports only Web-socket protocol. In that case, you've use a type of this WebCommunicator class.
Definition at line 35 of file WebCommunicator.hpp.
|
inlineoverridevirtual |
Send message.
Send the Invoke message to remote system.
invoke | An Invoke message to send. |
Reimplemented from samchon::protocol::Communicator.
Definition at line 49 of file WebCommunicator.hpp.
References samchon::protocol::Communicator::replyData(), samchon::ByteArray::write(), and samchon::ByteArray::writeReversely().