...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Returns a prefix of a constant buffer.
Defined in header <boost/beast/core/buffers_prefix.hpp>
boost::asio::const_buffer buffers_prefix( std::size_t size, boost::asio::const_buffer buffer);
The returned buffer points to the same memory as the passed buffer, but with a size that is equal to or less than the size of the original buffer.
Name |
Description |
---|---|
|
The size of the returned buffer. |
|
The buffer to shorten. The underlying memory is not modified. |
A new buffer that points to the first size
bytes of the original buffer.
Convenience header <boost/beast/core.hpp>