// some data have been sent.
ASSERT_GT(sent_size, 0);
- // Receive response from the socket.
+ // Receive response from the socket. Very small receive buffer ensures that
+ // we will read the response in chunks.
std::array<char, 2> read_buf;
size_t bytes_read = 0;
std::string response;
/// @brief Generates response of a given length.
///
+ /// Note: The response may be a few bytes larger than requested.
+ ///
/// @param response_size Desired response size.
void generateCustomResponse(const uint64_t response_size);
/// necessarily indicate a problem and the subsequent attempts to read
/// and write to the socket will succeed. Therefore, the handler simply
/// overrides this error code with success status. The user supplied
- /// handler don't need to deal with the EINPROGRESS error codes.
+ /// handler doesn't need to deal with the EINPROGRESS error codes.
///
/// @param remote_handler User supplied callback.
/// @param ec Error code returned as a result of connection.