TARAXA
taraxa::net::JsonRpcWsSession Class Referencefinal

#include <jsonrpc_ws_server.hpp>

Collaboration diagram for taraxa::net::JsonRpcWsSession:

Public Member Functions

std::string processRequest (const std::string_view &request) override
 
 WsSession (tcp::socket &&socket, addr_t node_addr, std::shared_ptr< WsServer > ws_server)
 
- Public Member Functions inherited from taraxa::net::WsSession
 WsSession (tcp::socket &&socket, addr_t node_addr, std::shared_ptr< WsServer > ws_server)
 
void run ()
 
void close (bool normal=true)
 
void on_accept (beast::error_code ec)
 
void do_read ()
 
void on_read (beast::error_code ec, std::size_t bytes_transferred)
 
void newEthBlock (const ::taraxa::final_chain::BlockHeader &payload, const TransactionHashes &trx_hashes)
 
void newDagBlock (const DagBlock &blk)
 
void newDagBlockFinalized (const blk_hash_t &blk, uint64_t period)
 
void newPbftBlockExecuted (const Json::Value &payload)
 
void newPendingTransaction (const trx_hash_t &trx_hash)
 
void newPillarBlockData (const pillar_chain::PillarBlockData &pillar_block_data)
 
bool is_closed () const
 
bool is_normal (const beast::error_code &ec) const
 
void on_write (beast::error_code ec, std::size_t bytes_transferred)
 

Private Member Functions

std::string handleRequest (const Json::Value &req)
 
std::string handleSubscription (const Json::Value &req)
 

Additional Inherited Members

- Protected Member Functions inherited from taraxa::net::WsSession
void processAsync ()
 
void writeAsync (std::string &&message)
 
void writeImpl (std::string &&message)
 
- Protected Attributes inherited from taraxa::net::WsSession
websocket::stream< beast::tcp_stream > ws_
 
boost::asio::strand< boost::asio::any_io_executor > write_strand_
 
beast::flat_buffer read_buffer_
 
std::atomic< int > subscription_id_ = 0
 
int new_heads_subscription_ = 0
 
int new_dag_blocks_subscription_ = 0
 
int new_transactions_subscription_ = 0
 
int new_dag_block_finalized_subscription_ = 0
 
int new_pbft_block_executed_subscription_ = 0
 
int new_pillar_block_subscription_ = 0
 
bool include_pillar_block_signatures = false
 
std::atomic< bool > closed_ = false
 
std::weak_ptr< WsServerws_server_
 

Member Function Documentation

◆ handleRequest()

std::string taraxa::net::JsonRpcWsSession::handleRequest ( const Json::Value &  req)
private

◆ handleSubscription()

std::string taraxa::net::JsonRpcWsSession::handleSubscription ( const Json::Value &  req)
private

◆ processRequest()

std::string taraxa::net::JsonRpcWsSession::processRequest ( const std::string_view &  request)
overridevirtual

◆ WsSession()

taraxa::net::WsSession::WsSession
inlineexplicit

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