Resolve conflicts
# Conflicts: # src/network/http/websocket.cpp
This commit is contained in:
commit
a8f70ff05b
2 changed files with 9 additions and 18 deletions
|
|
@ -72,6 +72,9 @@ namespace fc { namespace http {
|
||||||
void listen( uint16_t port );
|
void listen( uint16_t port );
|
||||||
void listen( const fc::ip::endpoint& ep );
|
void listen( const fc::ip::endpoint& ep );
|
||||||
void start_accept();
|
void start_accept();
|
||||||
|
uint16_t get_listening_port();
|
||||||
|
void stop_listening();
|
||||||
|
void close();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class detail::websocket_tls_server_impl;
|
friend class detail::websocket_tls_server_impl;
|
||||||
|
|
|
||||||
|
|
@ -132,14 +132,10 @@ namespace fc { namespace http {
|
||||||
typedef websocketpp::transport::asio::tls_socket::endpoint socket_type;
|
typedef websocketpp::transport::asio::tls_socket::endpoint socket_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef websocketpp::transport::asio::endpoint<transport_config>
|
typedef websocketpp::transport::asio::endpoint<transport_config> transport_type;
|
||||||
transport_type;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using websocketpp::connection_hdl;
|
using websocketpp::connection_hdl;
|
||||||
typedef websocketpp::server<asio_with_stub_log> websocket_server_type;
|
typedef websocketpp::server<asio_with_stub_log> websocket_server_type;
|
||||||
typedef websocketpp::server<asio_tls_stub_log> websocket_tls_server_type;
|
typedef websocketpp::server<asio_tls_stub_log> websocket_tls_server_type;
|
||||||
|
|
@ -399,17 +395,6 @@ namespace fc { namespace http {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef websocketpp::client<asio_with_stub_log> websocket_client_type;
|
typedef websocketpp::client<asio_with_stub_log> websocket_client_type;
|
||||||
typedef websocketpp::client<asio_tls_stub_log> websocket_tls_client_type;
|
typedef websocketpp::client<asio_tls_stub_log> websocket_tls_client_type;
|
||||||
|
|
||||||
|
|
@ -465,6 +450,8 @@ namespace fc { namespace http {
|
||||||
if( _closed )
|
if( _closed )
|
||||||
_closed->wait();
|
_closed->wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fc::promise<void>::ptr _connected;
|
fc::promise<void>::ptr _connected;
|
||||||
fc::promise<void>::ptr _closed;
|
fc::promise<void>::ptr _closed;
|
||||||
fc::thread& _client_thread;
|
fc::thread& _client_thread;
|
||||||
|
|
@ -622,7 +609,7 @@ namespace fc { namespace http {
|
||||||
{ try {
|
{ try {
|
||||||
if( uri.substr(0,4) == "wss:" )
|
if( uri.substr(0,4) == "wss:" )
|
||||||
return secure_connect(uri);
|
return secure_connect(uri);
|
||||||
FC_ASSERT( uri.substr(0,3) == "ws:" );
|
FC_ASSERT( uri.substr(0,4) == "wss:" || uri.substr(0,3) == "ws:", "Unsupported protocol" );
|
||||||
|
|
||||||
// wlog( "connecting to ${uri}", ("uri",uri));
|
// wlog( "connecting to ${uri}", ("uri",uri));
|
||||||
websocketpp::lib::error_code ec;
|
websocketpp::lib::error_code ec;
|
||||||
|
|
@ -650,7 +637,8 @@ namespace fc { namespace http {
|
||||||
{ try {
|
{ try {
|
||||||
if( uri.substr(0,3) == "ws:" )
|
if( uri.substr(0,3) == "ws:" )
|
||||||
return connect(uri);
|
return connect(uri);
|
||||||
FC_ASSERT( uri.substr(0,4) == "wss:" );
|
FC_ASSERT( uri.substr(0,4) == "wss:" || uri.substr(0,3) == "ws:", "Unsupported protocol" );
|
||||||
|
|
||||||
// wlog( "connecting to ${uri}", ("uri",uri));
|
// wlog( "connecting to ${uri}", ("uri",uri));
|
||||||
websocketpp::lib::error_code ec;
|
websocketpp::lib::error_code ec;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue