mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
1bb5e0ac63
~ if (remaining_length_ < to_read) ~ to_read = remaining_length_; + adaptor_.socket().async_read_some(boost::asio::buffer(buffer_, static_cast<std::size_t>(to_read)) - size_t to_read = buffer_.size(); ~ if (remaining_length_ < to_read) ~ to_read = remaining_length_; - adaptor_.socket().async_read_some( boost::asio::buffer(buffer_, to_read) ~ Changed 'to_read' from [std::size_t] to [std::uint64_t], hence when 'remaining_length_' [std::uint64_t] is assigned in 'to_read' no data is lossed. When boost::asio::buffer is created 'to_read' is casted back to [std::size_t] explicitly truncating data. It seems to be the correct behavior to choose fixed 'network side' types. |
||
---|---|---|
.. | ||
crow | ||
crow.h |