mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 04:47:29 +02:00
@ -5,6 +5,7 @@ Version 158:
|
||||
* Examples set reuse_address(true)
|
||||
* Advanced servers support clean shutdown via SIGINT or SIGTERM
|
||||
* DynamicBuffer input areas are not mutable
|
||||
* Tidy up some documentation
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@ -41,24 +41,27 @@ composed operations:
|
||||
[[
|
||||
[link beast.ref.boost__beast__bind_handler `bind_handler`]
|
||||
][
|
||||
This function returns a new, nullary completion handler which when
|
||||
invoked with no arguments invokes the original completion handler with a
|
||||
list of bound arguments. The invocation is made from the same implicit
|
||||
or explicit strand as that which would be used to invoke the original
|
||||
handler. This works because the returned call wrapper uses the same
|
||||
associated executor and associated allocator as the bound 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 substituted 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, whose associated allocator and associated executor will
|
||||
will be the same as those of the original handler.
|
||||
]]
|
||||
[[
|
||||
[link beast.ref.boost__beast__handler_ptr `handler_ptr`]
|
||||
][
|
||||
This is a smart pointer container used to manage the internal state of a
|
||||
composed operation. It is useful when the state is non trivial. For example
|
||||
when the state has non-copyable or expensive to copy types. The container
|
||||
takes ownership of the final completion handler, and provides boilerplate
|
||||
to invoke the final handler in a way that also deletes the internal state.
|
||||
The internal state is allocated using the final completion handler's
|
||||
associated allocator, benefiting from all handler memory management
|
||||
optimizations transparently.
|
||||
when the state has non-movable or contains expensive to move types. The
|
||||
container takes ownership of the final completion handler, and provides
|
||||
boilerplate to invoke the final handler in a way that also deletes the
|
||||
internal state. The internal state is allocated using the final completion
|
||||
handler's associated allocator, benefiting from all handler memory
|
||||
management optimizations transparently.
|
||||
]]
|
||||
]
|
||||
|
||||
|
@ -31,11 +31,6 @@ namespace beast {
|
||||
handler, whose associated allocator and associated executor will
|
||||
will be the same as those of the original handler.
|
||||
|
||||
Unlike `boost::asio::io_context::wrap`, the returned handler can
|
||||
be used in a subsequent call to `boost::asio::post` instead of
|
||||
`boost::asio::dispatch`, to ensure that the handler will not be
|
||||
invoked immediately by the calling function.
|
||||
|
||||
Example:
|
||||
|
||||
@code
|
||||
|
Reference in New Issue
Block a user