BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
5 #include <boost/any.hpp>
10 namespace fc {
namespace http {
24 virtual void send_message(
const std::string& message ) = 0;
25 virtual void close( int64_t code,
const std::string& reason ){};
26 void on_message(
const std::string& message ) { _on_message(message); }
43 boost::any _session_data;
44 std::function<void(
const std::string&)> _on_message;
60 void listen( uint16_t port );
70 std::unique_ptr<detail::websocket_server_impl> my;
80 const std::string& ssl_password,
81 const std::string& forward_header_key );
85 void listen( uint16_t port );
95 std::unique_ptr<detail::websocket_tls_server_impl> my;
109 void append_header(
const std::string& key,
const std::string& value);
111 std::unique_ptr<detail::websocket_client_impl> my;
112 std::unique_ptr<detail::websocket_tls_client_impl> smy;
uint16_t get_listening_port()
void on_message_handler(const std::function< void(const std::string &)> &h)
void on_connection(const on_connection_handler &handler)
std::shared_ptr< websocket_connection > websocket_connection_ptr
boost::signals2::signal< T > signal
void on_message(const std::string &message)
websocket_client(const std::string &ca_filename="_default")
virtual void close(int64_t code, const std::string &reason)
boost::any & get_session_data()
std::vector< header > headers
fc::http::reply on_http(const std::string &message)
fc::signal< void()> closed
virtual void send_message(const std::string &message)=0
uint16_t get_listening_port()
void append_header(const std::string &key, const std::string &value)
void set_session_data(boost::any d)
std::string _remote_endpoint
websocket_server(const std::string &forward_header_key)
websocket_connection_ptr connect(const std::string &uri)
websocket_tls_server(const std::string &server_pem, const std::string &ssl_password, const std::string &forward_header_key)
virtual ~websocket_connection()
void on_http_handler(const std::function< fc::http::reply(const std::string &)> &h)
virtual std::string get_request_header(const std::string &key)=0
void listen(uint16_t port)
const std::string & get_remote_endpoint_string() const
void on_connection(const on_connection_handler &handler)
std::function< void(const websocket_connection_ptr &)> on_connection_handler
void listen(uint16_t port)
websocket_connection_ptr secure_connect(const std::string &uri)