mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-22 12:45:52 +00:00
rebase
This commit is contained in:
@@ -30,8 +30,15 @@
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
<<<<<<< HEAD:server/websocket_server_async.cpp
|
||||
#include <server/listener.h>
|
||||
#include <server/session.h>
|
||||
=======
|
||||
#include <reporting/ReportingETL.h>
|
||||
#include <reporting/server/listener.h>
|
||||
#include <reporting/server/WsSession.h>
|
||||
#include <reporting/server/HttpSession.h>
|
||||
>>>>>>> 27506bc (rebase handlers):websocket_server_async.cpp
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
@@ -99,12 +106,45 @@ initLogLevel(int level)
|
||||
void
|
||||
start(boost::asio::io_context& ioc, std::uint32_t numThreads)
|
||||
{
|
||||
<<<<<<< HEAD:server/websocket_server_async.cpp
|
||||
std::vector<std::thread> v;
|
||||
v.reserve(numThreads - 1);
|
||||
for (auto i = numThreads - 1; i > 0; --i)
|
||||
v.emplace_back([&ioc] { ioc.run(); });
|
||||
|
||||
ioc.run();
|
||||
=======
|
||||
auto const address =
|
||||
boost::asio::ip::make_address(wsConfig.at("ip").as_string().c_str());
|
||||
auto const port =
|
||||
static_cast<unsigned short>(wsConfig.at("port").as_uint64());
|
||||
|
||||
// Create and launch a listening port
|
||||
std::make_shared<listener<WsSession>>(
|
||||
ioc,
|
||||
boost::asio::ip::tcp::endpoint{address, port},
|
||||
etl)
|
||||
->run();
|
||||
}
|
||||
|
||||
void
|
||||
openHttpServer(
|
||||
boost::json::object const& httpConfig,
|
||||
boost::asio::io_context& ioc,
|
||||
ReportingETL& etl)
|
||||
{
|
||||
auto const address =
|
||||
boost::asio::ip::make_address(httpConfig.at("ip").as_string().c_str());
|
||||
auto const port =
|
||||
static_cast<unsigned short>(httpConfig.at("port").as_uint64());
|
||||
|
||||
// Create and launch a listening port
|
||||
std::make_shared<listener<HttpSession>>(
|
||||
ioc,
|
||||
boost::asio::ip::tcp::endpoint{address, port},
|
||||
etl)
|
||||
->run();
|
||||
>>>>>>> 27506bc (rebase handlers):websocket_server_async.cpp
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user