mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 22:45:52 +00:00
Fixes and simplifications to HTTP example server:
The example HTTP server is updated to provide the correct MIME-type. It no longer uses the now-deprecated http::stream class, since that implementation does not provide flow control. A new example async_write function is provided in the asynchronous server for managing the lifetime of a message sent asynchronously. The logging is thread-safe, and a bug causing connections to malfunction is fixed.
This commit is contained in:
@@ -57,8 +57,13 @@ int main(int ac, char const* av[])
|
||||
endpoint_type ep{address_type::from_string(ip), port};
|
||||
|
||||
if(sync)
|
||||
{
|
||||
http_sync_server server(ep, root);
|
||||
beast::test::sig_wait();
|
||||
}
|
||||
else
|
||||
{
|
||||
http_async_server server(ep, threads, root);
|
||||
beast::test::sig_wait();
|
||||
beast::test::sig_wait();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user