The __DynamicBuffer__ concept defines a resizable buffer sequence interface. Algorithms may be expressed in terms of dynamic buffers when the memory requirements are not known ahead of time, for example when reading an HTTP message from a stream. Beast provides a well-rounded collection of dynamic buffer types such as [link beast.ref.boost__beast__buffers_adaptor `buffers_adaptor`], [link beast.ref.boost__beast__flat_buffer `flat_buffer`], [link beast.ref.boost__beast__multi_buffer `multi_buffer`], and [link beast.ref.boost__beast__static_buffer `static_buffer`]. The following function reads data from a [link beast.ref.boost__beast__tcp_stream `tcp_stream`] into a dynamic buffer until it encountering a newline character, using [@boost:/doc/html/boost_asio/reference/buffers_iterator.html `net::buffers_iterator`] to treat the contents of the buffer as a range of characters:
The __DynamicBuffer__ concept defines a resizable buffer sequence interface. Algorithms may be expressed in terms of dynamic buffers when the memory requirements are not known ahead of time, for example when reading an HTTP message from a stream. Beast provides a well-rounded collection of dynamic buffer types such as [link beast.ref.boost__beast__buffers_adaptor `buffers_adaptor`], [link beast.ref.boost__beast__flat_buffer `flat_buffer`], [link beast.ref.boost__beast__multi_buffer `multi_buffer`], and [link beast.ref.boost__beast__static_buffer `static_buffer`]. The following function reads data from a [link beast.ref.boost__beast__tcp_stream `tcp_stream`] into a dynamic buffer until it encountering a newline character, using [@boost:/doc/html/boost_asio/reference/buffers_iterator.html `net::buffers_iterator`] to treat the contents of the buffer as a range of characters: