* Flush any buffered data to the underlying Asio stream. * * If the `finish` parameter is set to true, it indicates that no more data will * be buffered/generated, and the HTTP body will be finalized accordingly. * * @param finish Whether this is the final flush operation. */
| 659 | * @param finish Whether this is the final flush operation. |
| 660 | */ |
| 661 | void AsioProtobufOutStream::Flush(bool finish) |
| 662 | { |
| 663 | ASSERT(m_Buffered > 0 || finish); |
| 664 | m_Writer.Commit(m_Buffered); |
| 665 | m_Writer.Flush(m_YieldContext, finish); |
| 666 | m_Pos += static_cast<int64_t>(m_Buffered); |
| 667 | m_Buffered = 0; |
| 668 | } |
| 669 | |
| 670 | /** |
| 671 | * Check if the underlying HTTP request writer has completed writing. |