mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-21 20:25:52 +00:00
fix link error
This commit is contained in:
@@ -11,7 +11,11 @@ project(reporting)
|
|||||||
cmake_minimum_required(VERSION 3.17)
|
cmake_minimum_required(VERSION 3.17)
|
||||||
set (CMAKE_CXX_STANDARD 17)
|
set (CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
FIND_PACKAGE( Boost 1.75 COMPONENTS thread system log REQUIRED )
|
set(Boost_USE_STATIC_LIBS ON)
|
||||||
|
set(Boost_USE_MULTITHREADED ON)
|
||||||
|
set(Boost_USE_STATIC_RUNTIME ON)
|
||||||
|
|
||||||
|
FIND_PACKAGE( Boost 1.75 COMPONENTS log log_setup thread system REQUIRED )
|
||||||
|
|
||||||
add_executable (reporting
|
add_executable (reporting
|
||||||
websocket_server_async.cpp
|
websocket_server_async.cpp
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
#define BOOST_LOG_DYN_LINK 1
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -230,14 +230,22 @@ private:
|
|||||||
std::optional<boost::json::object>
|
std::optional<boost::json::object>
|
||||||
parse_config(const char* filename)
|
parse_config(const char* filename)
|
||||||
{
|
{
|
||||||
std::ifstream in(filename, std::ios::in | std::ios::binary);
|
try
|
||||||
if (in)
|
|
||||||
{
|
{
|
||||||
std::stringstream contents;
|
std::ifstream in(filename, std::ios::in | std::ios::binary);
|
||||||
contents << in.rdbuf();
|
if (in)
|
||||||
in.close();
|
{
|
||||||
boost::json::value value = boost::json::parse(contents.str());
|
std::stringstream contents;
|
||||||
return value.as_object();
|
contents << in.rdbuf();
|
||||||
|
in.close();
|
||||||
|
std::cout << contents.str() << std::endl;
|
||||||
|
boost::json::value value = boost::json::parse(contents.str());
|
||||||
|
return value.as_object();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (std::exception const& e)
|
||||||
|
{
|
||||||
|
std::cout << e.what() << std::endl;
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@@ -247,12 +255,12 @@ int
|
|||||||
main(int argc, char* argv[])
|
main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
// Check command line arguments.
|
// Check command line arguments.
|
||||||
if (argc != 4)
|
if (argc != 5)
|
||||||
{
|
{
|
||||||
std::cerr
|
std::cerr << "Usage: websocket-server-async <address> <port> <threads> "
|
||||||
<< "Usage: websocket-server-async <address> <port> <threads>\n"
|
"<config_file> \n"
|
||||||
<< "Example:\n"
|
<< "Example:\n"
|
||||||
<< " websocket-server-async 0.0.0.0 8080 1\n";
|
<< " websocket-server-async 0.0.0.0 8080 1\n";
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
auto const address = net::ip::make_address(argv[1]);
|
auto const address = net::ip::make_address(argv[1]);
|
||||||
|
|||||||
Reference in New Issue
Block a user