Exemple #1
0
void Connection::readMore(ReplyPtr reply, int timeout)
{
  if (!rcv_body_buffer_) {
    rcv_body_buffer_ = true;
    rcv_buffers_.push_back(Buffer());
  }
  startAsyncReadBody(reply, rcv_buffers_.back(), timeout);
}
Exemple #2
0
void Connection::handleReadBody()
{
  if (reply_) {
    bool result = request_parser_
      .parseBody(request_, reply_, remaining_, buffer_.data() + buffer_size_);

    if (!result)
      startAsyncReadBody(buffer_, CONNECTION_TIMEOUT);
  } else {
    LOG_DEBUG(socket().native() << "handleReadBody(): no reply");
  }
}