BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
fc::rpc::websocket_api_connection Class Reference

#include <websocket_api.hpp>

Inheritance diagram for fc::rpc::websocket_api_connection:
fc::api_connection

Public Member Functions

 websocket_api_connection (const std::shared_ptr< fc::http::websocket_connection > &c, uint32_t max_conversion_depth)
 
 ~websocket_api_connection ()
 
virtual variant send_call (api_id_type api_id, string method_name, variants args=variants()) override
 
virtual variant send_callback (uint64_t callback_id, variants args=variants()) override
 
virtual void send_notice (uint64_t callback_id, variants args=variants()) override
 
- Public Member Functions inherited from fc::api_connection
 api_connection (uint32_t max_depth)
 
virtual ~api_connection ()
 
template<typename T >
api< T > get_remote_api (api_id_type api_id=0)
 
variant receive_call (api_id_type api_id, const string &method_name, const variants &args=variants()) const
 
variant receive_callback (uint64_t callback_id, const variants &args=variants()) const
 
void receive_notice (uint64_t callback_id, const variants &args=variants()) const
 
template<typename Interface >
api_id_type register_api (const Interface &a)
 
template<typename Signature >
uint64_t register_callback (const std::function< Signature > &cb)
 
std::vector< std::string > get_method_names (api_id_type local_api_id=0) const
 

Protected Member Functions

response on_message (const std::string &message)
 
response on_request (const variant &message)
 
void on_response (const variant &message)
 

Protected Attributes

std::shared_ptr< fc::http::websocket_connection_connection
 
fc::rpc::state _rpc_state
 

Additional Inherited Members

- Public Attributes inherited from fc::api_connection
fc::signal< void()> closed
 
const uint32_t _max_conversion_depth
 

Detailed Description

Definition at line 8 of file websocket_api.hpp.

Constructor & Destructor Documentation

◆ websocket_api_connection()

fc::rpc::websocket_api_connection::websocket_api_connection ( const std::shared_ptr< fc::http::websocket_connection > &  c,
uint32_t  max_conversion_depth 
)

Definition at line 11 of file websocket_api.cpp.

◆ ~websocket_api_connection()

fc::rpc::websocket_api_connection::~websocket_api_connection ( )

Definition at line 7 of file websocket_api.cpp.

Member Function Documentation

◆ on_message()

response fc::rpc::websocket_api_connection::on_message ( const std::string &  message)
protected

Definition at line 125 of file websocket_api.cpp.

◆ on_request()

response fc::rpc::websocket_api_connection::on_request ( const variant message)
protected

Definition at line 184 of file websocket_api.cpp.

◆ on_response()

void fc::rpc::websocket_api_connection::on_response ( const variant message)
protected

Definition at line 179 of file websocket_api.cpp.

◆ send_call()

variant fc::rpc::websocket_api_connection::send_call ( api_id_type  api_id,
string  method_name,
variants  args = variants() 
)
overridevirtual

makes calls to the remote server

Implements fc::api_connection.

Definition at line 83 of file websocket_api.cpp.

◆ send_callback()

variant fc::rpc::websocket_api_connection::send_callback ( uint64_t  callback_id,
variants  args = variants() 
)
overridevirtual

Implements fc::api_connection.

Definition at line 98 of file websocket_api.cpp.

◆ send_notice()

void fc::rpc::websocket_api_connection::send_notice ( uint64_t  callback_id,
variants  args = variants() 
)
overridevirtual

Implements fc::api_connection.

Definition at line 112 of file websocket_api.cpp.

Member Data Documentation

◆ _connection

std::shared_ptr<fc::http::websocket_connection> fc::rpc::websocket_api_connection::_connection
protected

Definition at line 31 of file websocket_api.hpp.

◆ _rpc_state

fc::rpc::state fc::rpc::websocket_api_connection::_rpc_state
protected

Definition at line 32 of file websocket_api.hpp.


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