FC Updates from BitShares and myself #21
2 changed files with 5 additions and 6 deletions
|
|
@ -34,7 +34,7 @@ namespace fc { namespace http {
|
||||||
|
|
||||||
virtual std::string get_request_header(const std::string& key) = 0;
|
virtual std::string get_request_header(const std::string& key) = 0;
|
||||||
|
|
||||||
const std::string& get_remote_endpoint()const { return _remote_endpoint; }
|
const std::string& get_remote_endpoint_string()const { return _remote_endpoint; }
|
||||||
|
|
||||||
fc::signal<void()> closed;
|
fc::signal<void()> closed;
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,7 @@ namespace fc { namespace http {
|
||||||
auto payload = msg->get_payload();
|
auto payload = msg->get_payload();
|
||||||
std::shared_ptr<websocket_connection> con = current_con->second;
|
std::shared_ptr<websocket_connection> con = current_con->second;
|
||||||
wlog( "[IN] ${remote_endpoint} ${msg}",
|
wlog( "[IN] ${remote_endpoint} ${msg}",
|
||||||
("remote_endpoint",con->get_remote_endpoint()) ("msg",payload) );
|
("remote_endpoint",con->get_remote_endpoint_string()) ("msg",payload) );
|
||||||
++_pending_messages;
|
++_pending_messages;
|
||||||
auto f = fc::async([this,con,payload](){
|
auto f = fc::async([this,con,payload](){
|
||||||
if( _pending_messages )
|
if( _pending_messages )
|
||||||
|
|
@ -278,7 +278,7 @@ namespace fc { namespace http {
|
||||||
_on_connection( current_con );
|
_on_connection( current_con );
|
||||||
|
|
||||||
con->defer_http_response();
|
con->defer_http_response();
|
||||||
std::string remote_endpoint = current_con->get_remote_endpoint();
|
std::string remote_endpoint = current_con->get_remote_endpoint_string();
|
||||||
std::string request_body = con->get_request_body();
|
std::string request_body = con->get_request_body();
|
||||||
wlog( "[IN] ${remote_endpoint} ${msg}",
|
wlog( "[IN] ${remote_endpoint} ${msg}",
|
||||||
("remote_endpoint",remote_endpoint) ("msg",request_body) );
|
("remote_endpoint",remote_endpoint) ("msg",request_body) );
|
||||||
|
|
@ -399,7 +399,7 @@ namespace fc { namespace http {
|
||||||
auto received = msg->get_payload();
|
auto received = msg->get_payload();
|
||||||
std::shared_ptr<websocket_connection> con = current_con->second;
|
std::shared_ptr<websocket_connection> con = current_con->second;
|
||||||
wlog( "[IN] ${remote_endpoint} ${msg}",
|
wlog( "[IN] ${remote_endpoint} ${msg}",
|
||||||
("remote_endpoint",con->get_remote_endpoint()) ("msg",received) );
|
("remote_endpoint",con->get_remote_endpoint_string()) ("msg",received) );
|
||||||
fc::async([con,received](){ con->on_message( received ); });
|
fc::async([con,received](){ con->on_message( received ); });
|
||||||
}).wait();
|
}).wait();
|
||||||
});
|
});
|
||||||
|
|
@ -413,7 +413,7 @@ namespace fc { namespace http {
|
||||||
try{
|
try{
|
||||||
_on_connection( current_con );
|
_on_connection( current_con );
|
||||||
|
|
||||||
std::string remote_endpoint = current_con->get_remote_endpoint();
|
std::string remote_endpoint = current_con->get_remote_endpoint_string();
|
||||||
std::string request_body = con->get_request_body();
|
std::string request_body = con->get_request_body();
|
||||||
wlog( "[IN] ${remote_endpoint} ${msg}",
|
wlog( "[IN] ${remote_endpoint} ${msg}",
|
||||||
("remote_endpoint",remote_endpoint) ("msg",request_body) );
|
("remote_endpoint",remote_endpoint) ("msg",request_body) );
|
||||||
|
|
@ -476,7 +476,6 @@ namespace fc { namespace http {
|
||||||
|
|
||||||
typedef websocket_client_type::connection_ptr websocket_client_connection_type;
|
typedef websocket_client_type::connection_ptr websocket_client_connection_type;
|
||||||
typedef websocket_tls_client_type::connection_ptr websocket_tls_client_connection_type;
|
typedef websocket_tls_client_type::connection_ptr websocket_tls_client_connection_type;
|
||||||
using websocketpp::connection_hdl;
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class generic_websocket_client_impl
|
class generic_websocket_client_impl
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue