11 #ifndef ASIO_DETAIL_BUFFERED_STREAM_STORAGE_HPP 12 #define ASIO_DETAIL_BUFFERED_STREAM_STORAGE_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 43 buffer_(buffer_capacity)
69 return begin_offset_ == end_offset_;
75 return end_offset_ - begin_offset_;
82 if (begin_offset_ + length <=
capacity())
84 end_offset_ = begin_offset_ + length;
89 memmove(&buffer_[0], &buffer_[0] + begin_offset_,
size());
98 return buffer_.size();
105 begin_offset_ += count;
112 size_type begin_offset_;
115 size_type end_offset_;
118 std::vector<byte_type> buffer_;
126 #endif // ASIO_DETAIL_BUFFERED_STREAM_STORAGE_HPP #define ASIO_ASSERT(expr)
Holds a buffer that cannot be modified.
buffered_stream_storage(std::size_t buffer_capacity)
mutable_buffers_1 buffer(const mutable_buffer &b)
Create a new modifiable buffer from an existing buffer.
const_buffer data() const
void resize(size_type length)
void clear()
Clear the buffer.
Holds a buffer that can be modified.
void consume(size_type count)
size_type capacity() const