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

#include <WebClientDriver.hpp>

Collaboration diagram for samchon::protocol::WebClientDriver:

Public Member Functions

auto getSessionID () const -> std::string
 
auto getPath () const -> std::string
 
- Public Member Functions inherited from samchon::protocol::ClientDriver
void listen (IProtocol *listener)
 
- Public Member Functions inherited from samchon::protocol::Communicator
virtual void close ()
 
virtual void replyData (std::shared_ptr< Invoke > invoke)
 
- Public Member Functions inherited from samchon::protocol::WebCommunicator
virtual void sendData (std::shared_ptr< Invoke > invoke) override
 

Detailed Description

A communicator with remote web-client.

The WebClientDriver class is a type of WebCommunicator, specified for communication with remote web-client who has connected in a WebServer object who follows the protocol of web-socket. The WebClientDriver takes full charge of network communication with the remote web-client.

The WebClientDriver object is always created by WebServer class. When you got this WebClientDriver object from the WebServer.addClient(), then specify listener with the WebClientDriver.listen() method. Below code is an example specifying and managing the listener objects.

Protocol Derived Type Created By
Samchon Framework's own ClientDriver Server
Web-socket protocol WebClientDriver WebServer

Unlike other protocol, Web-socket protocol's clients notify two parameters on their connection; session-id and path. The session-id can be used to identify user of each client, and the path can be used which type of service that client wants. In service module, you can see the best utilization case of them.

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

Definition at line 46 of file WebClientDriver.hpp.

Member Function Documentation

auto samchon::protocol::WebClientDriver::getSessionID ( ) const -> std::string
inline

Get session ID, an identifier of the remote client.

Definition at line 70 of file WebClientDriver.hpp.

Referenced by samchon::templates::service::Server::addClient().

Here is the caller graph for this function:

auto samchon::protocol::WebClientDriver::getPath ( ) const -> std::string
inline

Get requested path.

Definition at line 78 of file WebClientDriver.hpp.


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