Tidy up some documentation

fix #984
This commit is contained in:
Vinnie Falco
2018-02-21 13:58:33 -08:00
parent d79950d95c
commit 66f0814cfd
3 changed files with 16 additions and 17 deletions

View File

@ -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
--------------------------------------------------------------------------------

View File

@ -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.
]]
]

View File

@ -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