Samchon Framework for CPP
1.0.0
|
#include <IProtocol.hpp>
Public Member Functions | |
virtual void | replyData (std::shared_ptr< Invoke >)=0 |
virtual void | sendData (std::shared_ptr< Invoke >)=0 |
An interface for Invoke message chain.
IProtocol is an interface for Invoke message, which is standard message of network I/O in Samchon Framework, chain. The IProtocol interface is used to network drivers and some classes which are in a relationship of Chain of Responsibility Pattern with those network drivers.
Implements IProtocol if the class sends and handles Invoke messages. Looking around source codes of the Samchon Framework, especially Templates, you can find out that all the classes and modules handling Invoke messages are always implementing this IProtocol.
Definition at line 26 of file IProtocol.hpp.
|
pure virtual |
Handling replied message.
Handles a replied Invoke message or shifts the responsibility to chain.
invoke | An Invoke message has received. |
Implemented in samchon::protocol::Communicator.
Referenced by samchon::example::interaction::ChiefDriver::ChiefDriver(), samchon::example::interaction::MasterDriver::MasterDriver(), and samchon::protocol::Communicator::replyData().
|
pure virtual |
Send message.
Sends an Invoke message to related system or shifts the responsibility to chain.
invoke | Invoke message to send |
Implemented in samchon::protocol::Communicator, and samchon::protocol::WebCommunicator.