Первая часть успешно завершена

This commit is contained in:
2023-09-13 17:01:44 +03:00
parent 211869c631
commit 67e5fd080b
4 changed files with 51 additions and 6 deletions

View File

@ -15,6 +15,7 @@ using namespace std::literals;
namespace sys = boost::system;
namespace http = boost::beast::http;
using namespace std;
using net::ip::tcp;
// Запрос, тело которого представлено в виде строки
using StringRequest = http::request<http::string_body>;
@ -70,6 +71,7 @@ int main()
const unsigned num_threads = std::thread::hardware_concurrency();
net::io_context ioc(num_threads);
tcp::acceptor acceptor(net::make_strand(ioc));
// Подписываемся на сигналы и при их получении завершаем работу сервера
net::signal_set signals(ioc, SIGINT, SIGTERM);