ledger-core
Public Member Functions | List of all members
ledger::core::WebSocketConnImpl Class Reference
+ Inheritance diagram for ledger::core::WebSocketConnImpl:
+ Collaboration diagram for ledger::core::WebSocketConnImpl:

Public Member Functions

 WebSocketConnImpl (const WebSocketEventHandler &handler, const std::shared_ptr< ledger::core::WebSocketConnection > &conn)
 
void onConnect (int32_t connectionId) override
 
void onClose () override
 
void onMessage (const std::string &data) override
 
void onError (api::ErrorCode code, const std::string &message) override
 
int32_t getConnectionId () override
 

Member Function Documentation

◆ onClose()

void ledger::core::WebSocketConnImpl::onClose ( )
inlineoverridevirtual

Callback to call upon successful disconnection.

Implements ledger::core::api::WebSocketConnection.

◆ onConnect()

void ledger::core::WebSocketConnImpl::onConnect ( int32_t  connectionId)
inlineoverridevirtual

Callback to call upon successful connection.

Parameters
connectionId,theID of the Web Socket connection

Implements ledger::core::api::WebSocketConnection.

◆ onError()

void ledger::core::WebSocketConnImpl::onError ( api::ErrorCode  code,
const std::string &  message 
)
inlineoverridevirtual

Callback to call when a Web Socket error occurs.

Parameters
code,theerror code
message,adescription of the reason of the error

Implements ledger::core::api::WebSocketConnection.

◆ onMessage()

void ledger::core::WebSocketConnImpl::onMessage ( const std::string &  data)
inlineoverridevirtual

Callback to call upon each incoming message.

Parameters
data,theattached data to the input message

Implements ledger::core::api::WebSocketConnection.


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