forked from boostorg/beast
HTTP reads and writes return bytes transferred (API Change):
* HTTP read and write operations now return the number of bytes transferred to or from the stream. Actions Required: * Modify HTTP read and/or write completion handlers to receive the extra std::size_t bytes_transferred parameter.
This commit is contained in:
@@ -172,7 +172,7 @@ private:
|
||||
socket_,
|
||||
buffer_,
|
||||
*parser_,
|
||||
[this](boost::beast::error_code ec)
|
||||
[this](boost::beast::error_code ec, std::size_t)
|
||||
{
|
||||
if (ec)
|
||||
accept();
|
||||
@@ -220,7 +220,7 @@ private:
|
||||
http::async_write(
|
||||
socket_,
|
||||
*string_serializer_,
|
||||
[this](boost::beast::error_code ec)
|
||||
[this](boost::beast::error_code ec, std::size_t)
|
||||
{
|
||||
socket_.shutdown(tcp::socket::shutdown_send, ec);
|
||||
string_serializer_.reset();
|
||||
@@ -276,7 +276,7 @@ private:
|
||||
http::async_write(
|
||||
socket_,
|
||||
*file_serializer_,
|
||||
[this](boost::beast::error_code ec)
|
||||
[this](boost::beast::error_code ec, std::size_t)
|
||||
{
|
||||
socket_.shutdown(tcp::socket::shutdown_send, ec);
|
||||
file_serializer_.reset();
|
||||
|
||||
Reference in New Issue
Block a user