Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
websocket_api.hpp
Go to the documentation of this file.
1#pragma once
3#include <fc/rpc/state.hpp>
4#include <fc/network/http/websocket.hpp>
5#include <fc/io/json.hpp>
7
8namespace fc { namespace rpc {
9
11 {
12 public:
13 websocket_api_connection( fc::http::websocket_connection& c );
15
16 virtual variant send_call(
17 api_id_type api_id,
18 string method_name,
19 variants args = variants() ) override;
20 virtual variant send_callback(
21 uint64_t callback_id,
22 variants args = variants() ) override;
23 virtual void send_notice(
24 uint64_t callback_id,
25 variants args = variants() ) override;
26
27 protected:
28 std::string on_message(
29 const std::string& message,
30 bool send_message = true );
31
32 fc::http::websocket_connection& _connection;
33 fc::rpc::state _rpc_state;
34 };
35
36} } // namespace fc::rpc
std::string on_message(const std::string &message, bool send_message=true)
virtual variant send_call(api_id_type api_id, string method_name, variants args=variants()) override
fc::http::websocket_connection & _connection
virtual variant send_callback(uint64_t callback_id, variants args=variants()) override
websocket_api_connection(fc::http::websocket_connection &c)
virtual void send_notice(uint64_t callback_id, variants args=variants()) override
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Definition variant.hpp:191
namespace sysio::chain
Definition authority.cpp:3
uint32_t api_id_type
Definition api.hpp:46
std::vector< fc::variant > variants
Definition variant.hpp:173
unsigned __int64 uint64_t
Definition stdint.h:136