ledger-core
Public Member Functions | List of all members
ledger::core::api::WebSocketConnection Class Referenceabstract

#include <WebSocketConnection.hpp>

+ Inheritance diagram for ledger::core::api::WebSocketConnection:

Public Member Functions

virtual void onConnect (int32_t connectionId)=0
 
virtual void onClose ()=0
 
virtual void onMessage (const std::string &data)=0
 
virtual void onError (ErrorCode code, const std::string &message)=0
 
virtual int32_t getConnectionId ()=0
 

Detailed Description

A connection to a Web Socket.

Member Function Documentation

◆ onClose()

virtual void ledger::core::api::WebSocketConnection::onClose ( )
pure virtual

Callback to call upon successful disconnection.

Implemented in ledger::core::WebSocketConnImpl.

◆ onConnect()

virtual void ledger::core::api::WebSocketConnection::onConnect ( int32_t  connectionId)
pure virtual

Callback to call upon successful connection.

Parameters
connectionId,theID of the Web Socket connection

Implemented in ledger::core::WebSocketConnImpl.

◆ onError()

virtual void ledger::core::api::WebSocketConnection::onError ( ErrorCode  code,
const std::string &  message 
)
pure virtual

Callback to call when a Web Socket error occurs.

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

Implemented in ledger::core::WebSocketConnImpl.

◆ onMessage()

virtual void ledger::core::api::WebSocketConnection::onMessage ( const std::string &  data)
pure virtual

Callback to call upon each incoming message.

Parameters
data,theattached data to the input message

Implemented in ledger::core::WebSocketConnImpl.


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