BitShares-Core  4.0.0
BitShares blockchain implementation and command-line interface 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

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.

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

Definition at line 7 of file websocket_api.cpp.

Member Function Documentation

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

Definition at line 125 of file websocket_api.cpp.

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

Definition at line 184 of file websocket_api.cpp.

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

Definition at line 179 of file websocket_api.cpp.

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.

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.

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

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

Definition at line 31 of file websocket_api.hpp.

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: