BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
websocket_api.hpp
Go to the documentation of this file.
1 #pragma once
4 #include <fc/rpc/state.hpp>
5 
6 namespace fc { namespace rpc {
7 
9  {
10  public:
11  websocket_api_connection( const std::shared_ptr<fc::http::websocket_connection> &c,
12  uint32_t max_conversion_depth );
14 
15  virtual variant send_call(
16  api_id_type api_id,
17  string method_name,
18  variants args = variants() ) override;
19  virtual variant send_callback(
20  uint64_t callback_id,
21  variants args = variants() ) override;
22  virtual void send_notice(
23  uint64_t callback_id,
24  variants args = variants() ) override;
25 
26  protected:
27  response on_message( const std::string& message );
28  response on_request( const variant& message );
29  void on_response( const variant& message );
30 
31  std::shared_ptr<fc::http::websocket_connection> _connection;
33  };
34 
35 } } // namespace fc::rpc
fc::rpc::websocket_api_connection::send_callback
virtual variant send_callback(uint64_t callback_id, variants args=variants()) override
Definition: websocket_api.cpp:98
fc::rpc::websocket_api_connection::_rpc_state
fc::rpc::state _rpc_state
Definition: websocket_api.hpp:32
fc::rpc::websocket_api_connection::~websocket_api_connection
~websocket_api_connection()
Definition: websocket_api.cpp:7
fc
Definition: api.hpp:15
fc::api_id_type
uint32_t api_id_type
Definition: api.hpp:122
api_connection.hpp
fc::rpc::response
Definition: state.hpp:22
fc::variants
std::vector< variant > variants
Definition: variant.hpp:170
fc::rpc::websocket_api_connection::on_message
response on_message(const std::string &message)
Definition: websocket_api.cpp:125
fc::rpc::websocket_api_connection::send_call
virtual variant send_call(api_id_type api_id, string method_name, variants args=variants()) override
Definition: websocket_api.cpp:83
fc::rpc::websocket_api_connection::on_request
response on_request(const variant &message)
Definition: websocket_api.cpp:184
fc::rpc::websocket_api_connection::on_response
void on_response(const variant &message)
Definition: websocket_api.cpp:179
websocket.hpp
fc::rpc::websocket_api_connection::send_notice
virtual void send_notice(uint64_t callback_id, variants args=variants()) override
Definition: websocket_api.cpp:112
fc::rpc::websocket_api_connection
Definition: websocket_api.hpp:8
fc::variant
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Definition: variant.hpp:198
fc::rpc::websocket_api_connection::_connection
std::shared_ptr< fc::http::websocket_connection > _connection
Definition: websocket_api.hpp:31
fc::rpc::websocket_api_connection::websocket_api_connection
websocket_api_connection(const std::shared_ptr< fc::http::websocket_connection > &c, uint32_t max_conversion_depth)
Definition: websocket_api.cpp:11
fc::rpc::state
Definition: state.hpp:37
state.hpp
fc::api_connection
Definition: api_connection.hpp:240