diff --git a/include/fc/network/http/websocket.hpp b/include/fc/network/http/websocket.hpp index e47646b..0c765c1 100644 --- a/include/fc/network/http/websocket.hpp +++ b/include/fc/network/http/websocket.hpp @@ -103,15 +103,5 @@ namespace fc { namespace http { std::unique_ptr smy; std::vector> headers; }; - class websocket_tls_client - { - public: - websocket_tls_client( const std::string& ca_filename = "_default" ); - ~websocket_tls_client(); - - websocket_connection_ptr connect( const std::string& uri ); - private: - std::unique_ptr my; - }; } } diff --git a/src/network/http/websocket.cpp b/src/network/http/websocket.cpp index 9249126..6e6a395 100644 --- a/src/network/http/websocket.cpp +++ b/src/network/http/websocket.cpp @@ -676,11 +676,6 @@ namespace fc { namespace http { } - websocket_tls_client::websocket_tls_client( const std::string& ca_filename ):my( new detail::websocket_tls_client_impl( ca_filename ) ) {} - websocket_tls_client::~websocket_tls_client(){ } - - - websocket_client::websocket_client( const std::string& ca_filename ) :my( new detail::websocket_client_impl() ), smy(new detail::websocket_tls_client_impl( ca_filename )) @@ -764,28 +759,4 @@ namespace fc { namespace http { headers.push_back( std::make_pair(key, value) ); } - websocket_connection_ptr websocket_tls_client::connect( const std::string& uri ) - { try { - websocketpp::lib::error_code ec; - - my->_connected = promise::create("websocket::connect"); - - my->_client.set_open_handler( [=]( websocketpp::connection_hdl hdl ){ - auto con = my->_client.get_con_from_hdl(hdl); - my->_connection = std::make_shared>( con ); - my->_closed = promise::create("websocket::closed"); - my->_connected->set_value(); - }); - - auto con = my->_client.get_connection( uri, ec ); - if( ec ) - { - FC_ASSERT( !ec, "error: ${e}", ("e",ec.message()) ); - } - my->_client.connect(con); - my->_connected->wait(); - return my->_connection; - } FC_CAPTURE_AND_RETHROW( (uri) ) } - } } // fc::http