ゴミ箱
Namespaces | Classes | Typedefs | Enumerations | Functions
boost::beast Namespace Reference

Namespaces

 detail
 
 http
 
 websocket
 
 zlib
 

Classes

struct  async_completion
 
class  async_result
 
class  basic_flat_buffer
 
class  basic_multi_buffer
 
class  buffer_cat_view
 
class  buffer_prefix_view
 
class  buffered_read_stream
 
class  buffers_adapter
 
class  consuming_buffers
 
class  file_stdio
 
class  flat_static_buffer
 
class  flat_static_buffer_base
 
struct  get_lowest_layer
 
struct  get_lowest_layer< T, detail::void_t< typename T::lowest_layer_type > >
 
class  handler_alloc
 
class  handler_ptr
 
struct  has_get_io_service
 
struct  iequal
 
struct  iless
 
struct  is_async_read_stream
 
struct  is_async_write_stream
 
struct  is_const_buffer_sequence
 
struct  is_dynamic_buffer
 
struct  is_dynamic_buffer< boost::asio::basic_streambuf< Allocator > >
 
struct  is_file
 
struct  is_mutable_buffer_sequence
 
struct  is_sync_read_stream
 
struct  is_sync_write_stream
 
class  span
 
class  static_buffer
 
class  static_buffer_base
 
class  static_string
 
class  string_param
 

Typedefs

template<class CompletionToken , typename Signature >
using handler_type = typename beast::async_result< typename std::decay< CompletionToken >::type, Signature >::completion_handler_type
 
template<class CompletionToken , typename Signature >
using async_return_type = typename beast::async_result< typename std::decay< CompletionToken >::type, Signature >::return_type
 
using error_code = boost::system::error_code
 The type of error code used by the library. More...
 
using system_error = boost::system::system_error
 The type of system error thrown by the library. More...
 
using error_category = boost::system::error_category
 The type of error category used by the library. More...
 
using error_condition = boost::system::error_condition
 The type of error condition used by the library. More...
 
using file = file_stdio
 
using flat_buffer = basic_flat_buffer< std::allocator< char >>
 
using multi_buffer = basic_multi_buffer< std::allocator< char >>
 A typical multi buffer. More...
 
using string_view = boost::string_ref
 The type of string view used by the library. More...
 
template<class CharT , class Traits >
using basic_string_view = boost::basic_string_ref< CharT, Traits >
 The type of basic string view used by the library. More...
 
template<class T , class Signature >
using is_completion_handler = std::integral_constant< bool, std::is_copy_constructible< typename std::decay< T >::type >::value &&detail::is_invocable< T, Signature >::value >
 
template<class T >
using is_async_stream = std::integral_constant< bool, is_async_read_stream< T >::value &&is_async_write_stream< T >::value >
 
template<class T >
using is_sync_stream = std::integral_constant< bool, is_sync_read_stream< T >::value &&is_sync_write_stream< T >::value >
 

Enumerations

enum  file_mode {
  file_mode::read, file_mode::scan, file_mode::write, file_mode::write_new,
  file_mode::write_existing, file_mode::append, file_mode::append_new, file_mode::append_existing
}
 

Functions

template<class Handler , class... Args>
detail::bound_handler< typename std::decay< Handler >::type, Args... > bind_handler (Handler &&handler, Args &&...args)
 
template<class B1 , class B2 , class... Bn>
buffer_cat_view< B1, B2, Bn... > buffer_cat (B1 const &b1, B2 const &b2, Bn const &...bn)
 
boost::asio::const_buffer buffer_prefix (std::size_t size, boost::asio::const_buffer buffer)
 
boost::asio::mutable_buffer buffer_prefix (std::size_t size, boost::asio::mutable_buffer buffer)
 
template<class BufferSequence >
std::enable_if< !std::is_same< BufferSequence, boost::asio::const_buffer >::value &&!std::is_same< BufferSequence, boost::asio::mutable_buffer >::value, buffer_prefix_view< BufferSequence > >::type buffer_prefix (std::size_t size, BufferSequence const &buffers)
 
template<class BufferSequence >
std::conditional< is_mutable_buffer_sequence< BufferSequence >::value, boost::asio::mutable_buffer, boost::asio::const_buffer >::type buffer_front (BufferSequence const &buffers)
 
template<class Allocator >
void swap (basic_flat_buffer< Allocator > &lhs, basic_flat_buffer< Allocator > &rhs)
 
template<class Allocator >
void swap (basic_multi_buffer< Allocator > &lhs, basic_multi_buffer< Allocator > &rhs)
 
template<class DynamicBuffer >
std::size_t read_size (DynamicBuffer &buffer, std::size_t max_size)
 
template<class DynamicBuffer >
std::size_t read_size_or_throw (DynamicBuffer &buffer, std::size_t max_size)
 
template<class Integer >
static_string< detail::max_digits(sizeof(Integer))> to_static_string (Integer x)
 
template<class ConstBufferSequence >
detail::buffers_helper< ConstBufferSequence > buffers (ConstBufferSequence const &b)
 
template<class DynamicBuffer >
detail::ostream_helper< DynamicBuffer, char, std::char_traits< char >, detail::basic_streambuf_movable::value > ostream (DynamicBuffer &buffer)
 
template<std::size_t N, std::size_t M, class CharT , class Traits >
void operator+ (static_string< N, CharT, Traits >const &lhs, static_string< M, CharT, Traits >const &rhs)=delete
 
template<std::size_t N, class CharT , class Traits >
void operator+ (CharT const *lhs, static_string< N, CharT, Traits >const &rhs)=delete
 
template<std::size_t N, class CharT , class Traits >
void operator+ (CharT lhs, static_string< N, CharT, Traits > const &rhs)=delete
 
template<std::size_t N, class CharT , class Traits >
void operator+ (static_string< N, CharT, Traits > const &lhs, CharT const *rhs)=delete
 
template<std::size_t N, class CharT , class Traits >
void operator+ (static_string< N, CharT, Traits > const &lhs, CharT rhs)=delete
 
template<std::size_t N, std::size_t M, class CharT , class Traits >
bool operator== (static_string< N, CharT, Traits > const &lhs, static_string< M, CharT, Traits > const &rhs)
 
template<std::size_t N, std::size_t M, class CharT , class Traits >
bool operator!= (static_string< N, CharT, Traits > const &lhs, static_string< M, CharT, Traits > const &rhs)
 
template<std::size_t N, std::size_t M, class CharT , class Traits >
bool operator< (static_string< N, CharT, Traits > const &lhs, static_string< M, CharT, Traits > const &rhs)
 
template<std::size_t N, std::size_t M, class CharT , class Traits >
bool operator<= (static_string< N, CharT, Traits > const &lhs, static_string< M, CharT, Traits > const &rhs)
 
template<std::size_t N, std::size_t M, class CharT , class Traits >
bool operator> (static_string< N, CharT, Traits > const &lhs, static_string< M, CharT, Traits > const &rhs)
 
template<std::size_t N, std::size_t M, class CharT , class Traits >
bool operator>= (static_string< N, CharT, Traits > const &lhs, static_string< M, CharT, Traits > const &rhs)
 
template<std::size_t N, class CharT , class Traits >
bool operator== (CharT const *lhs, static_string< N, CharT, Traits > const &rhs)
 
template<std::size_t N, class CharT , class Traits >
bool operator== (static_string< N, CharT, Traits > const &lhs, CharT const *rhs)
 
template<std::size_t N, class CharT , class Traits >
bool operator!= (CharT const *lhs, static_string< N, CharT, Traits > const &rhs)
 
template<std::size_t N, class CharT , class Traits >
bool operator!= (static_string< N, CharT, Traits > const &lhs, CharT const *rhs)
 
template<std::size_t N, class CharT , class Traits >
bool operator< (CharT const *lhs, static_string< N, CharT, Traits > const &rhs)
 
template<std::size_t N, class CharT , class Traits >
bool operator< (static_string< N, CharT, Traits > const &lhs, CharT const *rhs)
 
template<std::size_t N, class CharT , class Traits >
bool operator<= (CharT const *lhs, static_string< N, CharT, Traits > const &rhs)
 
template<std::size_t N, class CharT , class Traits >
bool operator<= (static_string< N, CharT, Traits > const &lhs, CharT const *rhs)
 
template<std::size_t N, class CharT , class Traits >
bool operator> (CharT const *lhs, static_string< N, CharT, Traits > const &rhs)
 
template<std::size_t N, class CharT , class Traits >
bool operator> (static_string< N, CharT, Traits > const &lhs, CharT const *rhs)
 
template<std::size_t N, class CharT , class Traits >
bool operator>= (CharT const *lhs, static_string< N, CharT, Traits > const &rhs)
 
template<std::size_t N, class CharT , class Traits >
bool operator>= (static_string< N, CharT, Traits > const &lhs, CharT const *rhs)
 
template<std::size_t N, class CharT , class Traits >
void swap (static_string< N, CharT, Traits > &lhs, static_string< N, CharT, Traits > &rhs)
 
template<std::size_t N, std::size_t M, class CharT , class Traits >
void swap (static_string< N, CharT, Traits > &lhs, static_string< M, CharT, Traits > &rhs)
 
template<std::size_t N, class CharT , class Traits >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, static_string< N, CharT, Traits > const &str)
 
bool iequals (beast::string_view lhs, beast::string_view rhs)
 
struct std::declval< std::size_t & > ()
 
struct std::declval< detail::ReadHandler > ())
 
struct std::declval< detail::WriteHandler > ())
 

Typedef Documentation

template<class CompletionToken , typename Signature >
using boost::beast::async_return_type = typedef typename beast::async_result< typename std::decay<CompletionToken>::type, Signature>::return_type
template<class CharT , class Traits >
using boost::beast::basic_string_view = typedef boost::basic_string_ref<CharT, Traits>

The type of basic string view used by the library.

using boost::beast::error_category = typedef boost::system::error_category

The type of error category used by the library.

using boost::beast::error_code = typedef boost::system::error_code

The type of error code used by the library.

using boost::beast::error_condition = typedef boost::system::error_condition

The type of error condition used by the library.

using boost::beast::file = typedef file_stdio

An implementation of File.

This alias is set to the best available implementation of File given the platform and build settings.

using boost::beast::flat_buffer = typedef basic_flat_buffer<std::allocator<char>>
template<class CompletionToken , typename Signature >
using boost::beast::handler_type = typedef typename beast::async_result< typename std::decay<CompletionToken>::type, Signature>::completion_handler_type
template<class T >
using boost::beast::is_async_stream = typedef std::integral_constant<bool, is_async_read_stream<T>::value && is_async_write_stream<T>::value>

Determine if T meets the requirements of AsyncStream.

Metafunctions are used to perform compile time checking of template types. This type will be std::true_type if T meets the requirements, else the type will be std::false_type.

Example

Use with static_assert:

template<class AsyncStream>
void f(AsyncStream& stream)
{
static_assert(is_async_stream<AsyncStream>::value,
"AsyncStream requirements not met");
...

Use with std::enable_if (SFINAE):

template<class AsyncStream>
typename std::enable_if<is_async_stream<AsyncStream>::value>::type
f(AsyncStream& stream);
template<class T , class Signature >
using boost::beast::is_completion_handler = typedef std::integral_constant<bool, std::is_copy_constructible<typename std::decay<T>::type>::value && detail::is_invocable<T, Signature>::value>

Determine if T meets the requirements of CompletionHandler.

This trait checks whether a type meets the requirements for a completion handler, and is also callable with the specified signature. Metafunctions are used to perform compile time checking of template types. This type will be std::true_type if T meets the requirements, else the type will be std::false_type.

Example

Use with static_assert:

struct handler
{
void operator()(error_code&);
};
static_assert(is_completion_handler<handler, void(error_code&)>::value,
"Not a completion handler");
template<class T >
using boost::beast::is_sync_stream = typedef std::integral_constant<bool, is_sync_read_stream<T>::value && is_sync_write_stream<T>::value>

Determine if T meets the requirements of SyncStream.

Metafunctions are used to perform compile time checking of template types. This type will be std::true_type if T meets the requirements, else the type will be std::false_type.

Example

Use with static_assert:

template<class SyncStream>
void f(SyncStream& stream)
{
static_assert(is_sync_stream<SyncStream>::value,
"SyncStream requirements not met");
...

Use with std::enable_if (SFINAE):

template<class SyncStream>
typename std::enable_if<is_sync_stream<SyncStream>::value>::type
f(SyncStream& stream);
using boost::beast::multi_buffer = typedef basic_multi_buffer<std::allocator<char>>

A typical multi buffer.

using boost::beast::string_view = typedef boost::string_ref

The type of string view used by the library.

using boost::beast::system_error = typedef boost::system::system_error

The type of system error thrown by the library.

Enumeration Type Documentation

File open modes

These modes are used when opening files using instances of the File concept.

See also
file_stdio
Enumerator
read 

Random reading.

scan 

Sequential reading.

write 

Random writing to a new or truncated file

@li If the file does not exist, it is created.

@li If the file exists, it is truncated to
zero size upon opening.
write_new 

Random writing to new file only

If the file exists, an error is generated.
write_existing 

Random writing to existing file

If the file does not exist, an error is generated.
append 

Appending to a new or truncated file

The current file position shall be set to the end of
the file prior to each write.

@li If the file does not exist, it is created.

@li If the file exists, it is truncated to
zero size upon opening.
append_new 

Appending to a new file only

The current file position shall be set to the end of
the file prior to each write.

If the file exists, an error is generated.
append_existing 

Appending to an existing file

The current file position shall be set to the end of
the file prior to each write.

If the file does not exist, an error is generated.

Function Documentation

template<class Handler , class... Args>
detail::bound_handler< typename std::decay<Handler>::type, Args...> boost::beast::bind_handler ( Handler &&  handler,
Args &&...  args 
)

Bind parameters to a completion handler, creating a new handler.

This function creates a new handler which, when invoked, calls the original handler with the list of bound arguments. Any parameters passed in the invocation will be subtituted for placeholders present in the list of bound arguments. Parameters which are not matched to placeholders are silently discarded. The passed handler and arguments are forwarded into the returned handler, which provides the same io_service execution guarantees as the original handler.

Unlike boost::asio::io_service::wrap, the returned handler can be used in a subsequent call to boost::asio::io_service::post instead of boost::asio::io_service::dispatch, to ensure that the handler will not be invoked immediately by the calling function.

Example:

template<class AsyncReadStream, class ReadHandler>
void
signal_aborted(AsyncReadStream& stream, ReadHandler&& handler)
{
stream.get_io_service().post(
bind_handler(std::forward<ReadHandler>(handler),
boost::asio::error::operation_aborted, 0));
}
Parameters
handlerThe handler to wrap.
argsA list of arguments to bind to the handler. The arguments are forwarded into the returned object.
template<class B1 , class B2 , class... Bn>
buffer_cat_view<B1, B2, Bn...> boost::beast::buffer_cat ( B1 const &  b1,
B2 const &  b2,
Bn const &...  bn 
)
inline

Concatenate 2 or more buffer sequences.

This function returns a constant or mutable buffer sequence which, when iterated, efficiently concatenates the input buffer sequences. Copies of the arguments passed will be made; however, the returned object does not take ownership of the underlying memory. The application is still responsible for managing the lifetime of the referenced memory.

Parameters
buffersThe list of buffer sequences to concatenate.
Returns
A new buffer sequence that represents the concatenation of the input buffer sequences. This buffer sequence will be a MutableBufferSequence if each of the passed buffer sequences is also a MutableBufferSequence; otherwise the returned buffer sequence will be a ConstBufferSequence.
See also
buffer_cat_view
template<class BufferSequence >
std::conditional< is_mutable_buffer_sequence<BufferSequence>::value, boost::asio::mutable_buffer, boost::asio::const_buffer>::type boost::beast::buffer_front ( BufferSequence const &  buffers)

Returns the first buffer in a buffer sequence

This returns the first buffer in the buffer sequence. If the buffer sequence is an empty range, the returned buffer will have a zero buffer size.

Parameters
buffersThe buffer sequence. If the sequence is mutable, the returned buffer sequence will also be mutable. Otherwise, the returned buffer sequence will be constant.
boost::asio::const_buffer boost::beast::buffer_prefix ( std::size_t  size,
boost::asio::const_buffer  buffer 
)
inline

Returns a prefix of a constant 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.

Parameters
sizeThe size of the returned buffer.
bufferThe buffer to shorten. The underlying memory is not modified.
Returns
A new buffer that points to the first size bytes of the original buffer.
boost::asio::mutable_buffer boost::beast::buffer_prefix ( std::size_t  size,
boost::asio::mutable_buffer  buffer 
)
inline

Returns a prefix of a mutable 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.

Parameters
sizeThe size of the returned buffer.
bufferThe buffer to shorten. The underlying memory is not modified.
Returns
A new buffer that points to the first size bytes of the original buffer.
template<class BufferSequence >
std::enable_if< ! std::is_same<BufferSequence, boost::asio::const_buffer>::value && ! std::is_same<BufferSequence, boost::asio::mutable_buffer>::value, buffer_prefix_view<BufferSequence> >::type boost::beast::buffer_prefix ( std::size_t  size,
BufferSequence const &  buffers 
)
inline

Returns a prefix of a buffer sequence.

This function returns a new buffer sequence which when iterated, presents a shorter subset of the original list of buffers starting with the first byte of the original sequence.

Parameters
sizeThe maximum number of bytes in the wrapped sequence. If this is larger than the size of passed, buffers, the resulting sequence will represent the entire input sequence.
buffersAn instance of ConstBufferSequence or MutableBufferSequence to adapt. A copy of the sequence will be made, but ownership of the underlying memory is not transferred.
template<class ConstBufferSequence >
detail::buffers_helper<ConstBufferSequence> boost::beast::buffers ( ConstBufferSequence const &  b)

Return an object representing a ConstBufferSequence.

This function wraps a reference to a buffer sequence and permits the following operation:

  • operator<< to std::ostream. No character translation is performed; unprintable and null characters will be transferred as-is to the output stream.
Example
...
std::cout << buffers(b.data()) << std::endl;
Parameters
bAn object meeting the requirements of ConstBufferSequence to be streamed. The implementation will make a copy of this object. Ownership of the underlying memory is not transferred, the application is still responsible for managing its lifetime.
bool boost::beast::iequals ( beast::string_view  lhs,
beast::string_view  rhs 
)
inline

Returns true if two strings are equal, using a case-insensitive comparison.

The case-comparison operation is defined only for low-ASCII characters.

Parameters
lhsThe string on the left side of the equality
rhsThe string on the right side of the equality
template<std::size_t N, std::size_t M, class CharT , class Traits >
bool boost::beast::operator!= ( static_string< N, CharT, Traits > const &  lhs,
static_string< M, CharT, Traits > const &  rhs 
)
template<std::size_t N, class CharT , class Traits >
bool boost::beast::operator!= ( CharT const *  lhs,
static_string< N, CharT, Traits > const &  rhs 
)
template<std::size_t N, class CharT , class Traits >
bool boost::beast::operator!= ( static_string< N, CharT, Traits > const &  lhs,
CharT const *  rhs 
)
template<std::size_t N, std::size_t M, class CharT , class Traits >
void boost::beast::operator+ ( static_string< N, CharT, Traits >const &  lhs,
static_string< M, CharT, Traits >const &  rhs 
)
delete
template<std::size_t N, class CharT , class Traits >
void boost::beast::operator+ ( CharT const *  lhs,
static_string< N, CharT, Traits >const &  rhs 
)
delete
template<std::size_t N, class CharT , class Traits >
void boost::beast::operator+ ( CharT  lhs,
static_string< N, CharT, Traits > const &  rhs 
)
delete
template<std::size_t N, class CharT , class Traits >
void boost::beast::operator+ ( static_string< N, CharT, Traits > const &  lhs,
CharT const *  rhs 
)
delete
template<std::size_t N, class CharT , class Traits >
void boost::beast::operator+ ( static_string< N, CharT, Traits > const &  lhs,
CharT  rhs 
)
delete
template<std::size_t N, std::size_t M, class CharT , class Traits >
bool boost::beast::operator< ( static_string< N, CharT, Traits > const &  lhs,
static_string< M, CharT, Traits > const &  rhs 
)
template<std::size_t N, class CharT , class Traits >
bool boost::beast::operator< ( CharT const *  lhs,
static_string< N, CharT, Traits > const &  rhs 
)
template<std::size_t N, class CharT , class Traits >
bool boost::beast::operator< ( static_string< N, CharT, Traits > const &  lhs,
CharT const *  rhs 
)
template<std::size_t N, class CharT , class Traits >
std::basic_ostream<CharT, Traits>& boost::beast::operator<< ( std::basic_ostream< CharT, Traits > &  os,
static_string< N, CharT, Traits > const &  str 
)
template<std::size_t N, std::size_t M, class CharT , class Traits >
bool boost::beast::operator<= ( static_string< N, CharT, Traits > const &  lhs,
static_string< M, CharT, Traits > const &  rhs 
)
template<std::size_t N, class CharT , class Traits >
bool boost::beast::operator<= ( CharT const *  lhs,
static_string< N, CharT, Traits > const &  rhs 
)
template<std::size_t N, class CharT , class Traits >
bool boost::beast::operator<= ( static_string< N, CharT, Traits > const &  lhs,
CharT const *  rhs 
)
template<std::size_t N, std::size_t M, class CharT , class Traits >
bool boost::beast::operator== ( static_string< N, CharT, Traits > const &  lhs,
static_string< M, CharT, Traits > const &  rhs 
)
template<std::size_t N, class CharT , class Traits >
bool boost::beast::operator== ( CharT const *  lhs,
static_string< N, CharT, Traits > const &  rhs 
)
template<std::size_t N, class CharT , class Traits >
bool boost::beast::operator== ( static_string< N, CharT, Traits > const &  lhs,
CharT const *  rhs 
)
template<std::size_t N, std::size_t M, class CharT , class Traits >
bool boost::beast::operator> ( static_string< N, CharT, Traits > const &  lhs,
static_string< M, CharT, Traits > const &  rhs 
)
template<std::size_t N, class CharT , class Traits >
bool boost::beast::operator> ( CharT const *  lhs,
static_string< N, CharT, Traits > const &  rhs 
)
template<std::size_t N, class CharT , class Traits >
bool boost::beast::operator> ( static_string< N, CharT, Traits > const &  lhs,
CharT const *  rhs 
)
template<std::size_t N, std::size_t M, class CharT , class Traits >
bool boost::beast::operator>= ( static_string< N, CharT, Traits > const &  lhs,
static_string< M, CharT, Traits > const &  rhs 
)
template<std::size_t N, class CharT , class Traits >
bool boost::beast::operator>= ( CharT const *  lhs,
static_string< N, CharT, Traits > const &  rhs 
)
template<std::size_t N, class CharT , class Traits >
bool boost::beast::operator>= ( static_string< N, CharT, Traits > const &  lhs,
CharT const *  rhs 
)
template<class DynamicBuffer >
detail::ostream_helper< DynamicBuffer, char, std::char_traits<char>, detail::basic_streambuf_movable::value> boost::beast::ostream ( DynamicBuffer &  buffer)

Return an output stream that formats values into a DynamicBuffer.

This function wraps the caller provided DynamicBuffer into a std::ostream derived class, to allow operator<< stream style formatting operations.

Example
ostream(buffer) << "Hello, world!" << std::endl;
Note
Calling members of the underlying buffer before the output stream is destroyed results in undefined behavior.
Parameters
bufferAn object meeting the requirements of DynamicBuffer into which the formatted output will be placed.
Returns
An object derived from std::ostream which redirects output The wrapped dynamic buffer is not modified, a copy is made instead. Ownership of the underlying memory is not transferred, the application is still responsible for managing its lifetime. The caller is responsible for ensuring the dynamic buffer is not destroyed for the lifetime of the output stream.
template<class DynamicBuffer >
std::size_t boost::beast::read_size ( DynamicBuffer &  buffer,
std::size_t  max_size 
)
inline

Returns a natural read size.

This function inspects the capacity, size, and maximum size of the dynamic buffer. Then it computes a natural read size given the passed-in upper limit. It favors a read size that does not require a reallocation, subject to a reasonable minimum to avoid tiny reads.

Parameters
bufferThe dynamic buffer to inspect.
max_sizeAn upper limit on the returned value.
Note
If the buffer is already at its maximum size, zero is returned.
template<class DynamicBuffer >
std::size_t boost::beast::read_size_or_throw ( DynamicBuffer &  buffer,
std::size_t  max_size 
)

Returns a natural read size or throw if the buffer is full.

This function inspects the capacity, size, and maximum size of the dynamic buffer. Then it computes a natural read size given the passed-in upper limit. It favors a read size that does not require a reallocation, subject to a reasonable minimum to avoid tiny reads.

Parameters
bufferThe dynamic buffer to inspect.
max_sizeAn upper limit on the returned value.
Exceptions
std::length_errorif max_size > 0 and the buffer is full.
struct boost::beast::std::declval< detail::ReadHandler > ( )
struct boost::beast::std::declval< detail::WriteHandler > ( )
struct boost::beast::std::declval< std::size_t & > ( )
template<class Allocator >
void boost::beast::swap ( basic_flat_buffer< Allocator > &  lhs,
basic_flat_buffer< Allocator > &  rhs 
)
template<class Allocator >
void boost::beast::swap ( basic_multi_buffer< Allocator > &  lhs,
basic_multi_buffer< Allocator > &  rhs 
)
template<std::size_t N, class CharT , class Traits >
void boost::beast::swap ( static_string< N, CharT, Traits > &  lhs,
static_string< N, CharT, Traits > &  rhs 
)
template<std::size_t N, std::size_t M, class CharT , class Traits >
void boost::beast::swap ( static_string< N, CharT, Traits > &  lhs,
static_string< M, CharT, Traits > &  rhs 
)
template<class Integer >
static_string< detail::max_digits(sizeof(Integer))> boost::beast::to_static_string ( Integer  x)

Returns a static string representing an integer as a decimal.

Parameters
xThe signed or unsigned integer to convert. This must be an integral type.
Returns
A static_string with an implementation defined maximum size large enough to hold the longest possible decimal representation of any integer of the given type.