updates main.cpp
This commit is contained in:
parent
3b3ad70c2f
commit
50bfb4e2f0
1 changed files with 4 additions and 2 deletions
|
|
@ -209,9 +209,10 @@ int main( int argc, char** argv )
|
||||||
wallet_cli->set_prompt( locked ? "locked >>> " : "unlocked >>> " );
|
wallet_cli->set_prompt( locked ? "locked >>> " : "unlocked >>> " );
|
||||||
}));
|
}));
|
||||||
|
|
||||||
auto _websocket_server = std::make_shared<fc::http::websocket_server>();
|
std::shared_ptr<fc::http::websocket_server> _websocket_server;
|
||||||
if( options.count("rpc-endpoint") )
|
if( options.count("rpc-endpoint") )
|
||||||
{
|
{
|
||||||
|
_websocket_server = std::make_shared<fc::http::websocket_server>();
|
||||||
_websocket_server->on_connection([&wapi]( const fc::http::websocket_connection_ptr& c ){
|
_websocket_server->on_connection([&wapi]( const fc::http::websocket_connection_ptr& c ){
|
||||||
std::cout << "here... \n";
|
std::cout << "here... \n";
|
||||||
wlog("." );
|
wlog("." );
|
||||||
|
|
@ -228,9 +229,10 @@ int main( int argc, char** argv )
|
||||||
if( options.count( "rpc-tls-certificate" ) )
|
if( options.count( "rpc-tls-certificate" ) )
|
||||||
cert_pem = options.at("rpc-tls-certificate").as<string>();
|
cert_pem = options.at("rpc-tls-certificate").as<string>();
|
||||||
|
|
||||||
auto _websocket_tls_server = std::make_shared<fc::http::websocket_tls_server>(cert_pem);
|
std::shared_ptr<fc::http::websocket_tls_server> _websocket_tls_server;
|
||||||
if( options.count("rpc-tls-endpoint") )
|
if( options.count("rpc-tls-endpoint") )
|
||||||
{
|
{
|
||||||
|
_websocket_tls_server = std::make_shared<fc::http::websocket_tls_server>(cert_pem);
|
||||||
_websocket_tls_server->on_connection([&]( const fc::http::websocket_connection_ptr& c ){
|
_websocket_tls_server->on_connection([&]( const fc::http::websocket_connection_ptr& c ){
|
||||||
auto wsc = std::make_shared<fc::rpc::websocket_api_connection>(c, GRAPHENE_MAX_NESTED_OBJECTS);
|
auto wsc = std::make_shared<fc::rpc::websocket_api_connection>(c, GRAPHENE_MAX_NESTED_OBJECTS);
|
||||||
wsc->register_api(wapi);
|
wsc->register_api(wapi);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue