Samchon Framework for CPP  1.0.0
samchon::protocol::WebCommunicator Class Reference

#include <WebCommunicator.hpp>

Collaboration diagram for samchon::protocol::WebCommunicator:

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)
 

Detailed Description

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.

Basic Components
See also
WebClientDriver, WebServerConnector, IProtocol Protocol - Basic Components
Author
Jeongho Nam http://samchon.org

Definition at line 35 of file WebCommunicator.hpp.

Member Function Documentation

virtual void samchon::protocol::WebCommunicator::sendData ( std::shared_ptr< Invoke invoke)
inlineoverridevirtual

Send message.

Send the Invoke message to remote system.

Parameters
invokeAn 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().

Here is the call graph for this function:


The documentation for this class was generated from the following file: