Tidy up docs

This commit is contained in:
Vinnie Falco
2019-03-05 12:05:00 -08:00
parent 9f2b0ce1db
commit e073a9e7fc
59 changed files with 554 additions and 605 deletions

View File

@ -203,6 +203,7 @@
<xsl:template name="make-id"> <xsl:template name="make-id">
<xsl:param name="name"/> <xsl:param name="name"/>
<xsl:choose> <xsl:choose>
<!--
<xsl:when test="contains($name, 'boost::system::')"> <xsl:when test="contains($name, 'boost::system::')">
<xsl:call-template name="make-id"> <xsl:call-template name="make-id">
<xsl:with-param name="name" <xsl:with-param name="name"
@ -215,6 +216,7 @@
select="concat(substring-before($name, 'boost::asio::error::'), substring-after($name, 'boost::asio::error::'))"/> select="concat(substring-before($name, 'boost::asio::error::'), substring-after($name, 'boost::asio::error::'))"/>
</xsl:call-template> </xsl:call-template>
</xsl:when> </xsl:when>
-->
<xsl:when test="contains($name, '::')"> <xsl:when test="contains($name, '::')">
<xsl:call-template name="make-id"> <xsl:call-template name="make-id">
<xsl:with-param name="name" <xsl:with-param name="name"
@ -317,30 +319,27 @@
select="concat(substring-before($name, ' '), '_', substring-after($name, ' '))"/> select="concat(substring-before($name, ' '), '_', substring-after($name, ' '))"/>
</xsl:call-template> </xsl:call-template>
</xsl:when> </xsl:when>
<xsl:when test="contains($name, 'boost__posix_time__ptime')">
<xsl:call-template name="make-id">
<xsl:with-param name="name"
select="concat(substring-before($name, 'boost__posix_time__ptime'), 'ptime', substring-after($name, 'boost__posix_time__ptime'))"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$name"/> <xsl:value-of select="$name"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<!--========== Markup ==========--> <!--=========================================================================-->
<!-- Markup -->
<xsl:template match="para" mode="markup"> <xsl:template match="para" mode="markup">
<xsl:value-of select="$newline"/> <xsl:value-of select="$newline"/>
<xsl:apply-templates mode="markup"/> <xsl:apply-templates mode="markup"/>
<xsl:value-of select="$newline"/> <!--<xsl:value-of select="$newline"/>-->
</xsl:template> </xsl:template>
<xsl:template match="para" mode="markup-nested"> <xsl:template match="para" mode="markup-nested">
<xsl:apply-templates mode="markup-nested"/> <xsl:apply-templates mode="markup-nested"/>
</xsl:template> </xsl:template>
<!-- @par Command -->
<xsl:template match="title" mode="markup"> <xsl:template match="title" mode="markup">
<xsl:variable name="title"> <xsl:variable name="title">
<xsl:value-of select="."/> <xsl:value-of select="."/>
@ -360,15 +359,16 @@
<xsl:text>]</xsl:text> <xsl:text>]</xsl:text>
</xsl:template> </xsl:template>
<!-- Program listings -->
<xsl:template match="programlisting" mode="markup"> <xsl:template match="programlisting" mode="markup">
<xsl:value-of select="$newline"/> <xsl:text>&#xd;```&#xd;</xsl:text>
<xsl:value-of select="$newline"/>
<xsl:apply-templates mode="codeline"/> <xsl:apply-templates mode="codeline"/>
<xsl:value-of select="$newline"/> <xsl:text>```&#xd;</xsl:text>
<xsl:value-of select="$newline"/>
</xsl:template> </xsl:template>
<xsl:template match="programlisting" mode="markup-nested"> <xsl:template match="programlisting" mode="markup-nested">
<xsl:text>[role red error.programlisting]</xsl:text>
<!--
<xsl:value-of select="$newline"/> <xsl:value-of select="$newline"/>
<xsl:text>``</xsl:text> <xsl:text>``</xsl:text>
<xsl:value-of select="$newline"/> <xsl:value-of select="$newline"/>
@ -378,6 +378,7 @@
</xsl:if> </xsl:if>
<xsl:text>``</xsl:text> <xsl:text>``</xsl:text>
<xsl:value-of select="$newline"/> <xsl:value-of select="$newline"/>
-->
</xsl:template> </xsl:template>
<xsl:template match="codeline" mode="codeline"> <xsl:template match="codeline" mode="codeline">
@ -408,19 +409,18 @@
<xsl:text>&#xd;&#xd;</xsl:text> <xsl:text>&#xd;&#xd;</xsl:text>
</xsl:template> </xsl:template>
<!-- Backtick-quoted string -->
<xsl:template match="computeroutput" mode="markup"> <xsl:template match="computeroutput" mode="markup">
<xsl:text>`</xsl:text> <xsl:text>`</xsl:text>
<xsl:value-of select="."/> <xsl:value-of select="."/>
<xsl:text>`</xsl:text> <xsl:text>`</xsl:text>
</xsl:template> </xsl:template>
<xsl:template match="computeroutput" mode="markup-nested"> <xsl:template match="computeroutput" mode="markup-nested">
<xsl:text>`</xsl:text> <xsl:text>`</xsl:text>
<xsl:value-of select="."/> <xsl:value-of select="."/>
<xsl:text>`</xsl:text> <xsl:text>`</xsl:text>
</xsl:template> </xsl:template>
<!-- Ensure the list starts on its own line --> <!-- Ensure the list starts on its own line -->
<xsl:template match="orderedlist | itemizedlist" mode="markup"> <xsl:template match="orderedlist | itemizedlist" mode="markup">
<xsl:value-of select="$newline" /> <xsl:value-of select="$newline" />
@ -483,7 +483,9 @@
<xsl:text> [[`</xsl:text> <xsl:text> [[`</xsl:text>
<xsl:value-of select="parameternamelist"/> <xsl:value-of select="parameternamelist"/>
<xsl:text>`][&#xd; </xsl:text> <xsl:text>`][&#xd; </xsl:text>
<xsl:apply-templates select="parameterdescription" mode="markup-nested"/> <!-- No idea why this was using markup-nested instead of markup -->
<xsl:apply-templates select="parameterdescription" mode="markup"/>
<xsl:text>&#xd; ]]&#xd;</xsl:text> <xsl:text>&#xd; ]]&#xd;</xsl:text>
</xsl:template> </xsl:template>
@ -963,8 +965,8 @@
</xsl:for-each> </xsl:for-each>
<xsl:text>```&#xd;</xsl:text> <xsl:text>```&#xd;</xsl:text>
<xsl:call-template name="class-tables"> <xsl:call-template name="class-tables">
<xsl:with-param name="class-name" select="$class-name"/>
<xsl:with-param name="class-id" select="$class-id"/> <xsl:with-param name="class-id" select="$class-id"/>
<xsl:with-param name="class-name" select="$class-name"/>
</xsl:call-template> </xsl:call-template>
<xsl:text>&#xd;[heading Description]&#xd;</xsl:text> <xsl:text>&#xd;[heading Description]&#xd;</xsl:text>
<xsl:apply-templates select="detaileddescription" mode="markup"/> <xsl:apply-templates select="detaileddescription" mode="markup"/>
@ -1250,8 +1252,15 @@
</xsl:variable> </xsl:variable>
<xsl:if test="$overload-position = 1"> <xsl:if test="$overload-position = 1">
<xsl:text> [&#xd;</xsl:text> <xsl:text> [&#xd;</xsl:text>
<xsl:text> [[link </xsl:text><xsl:value-of select="$doc-ref"/> <xsl:text> [[link </xsl:text>
<xsl:value-of select="$class-id"/>.<xsl:value-of select="$id"/> <xsl:variable name="friend-link">
<!-- VFALCO This forms a link to a class member instead of a friend free function -->
<xsl:value-of select="$doc-ref"/>
<xsl:value-of select="$class-id"/>
<xsl:text>.</xsl:text>
<xsl:value-of select="$id"/>
</xsl:variable>
<xsl:value-of select="$friend-link"/>
<xsl:text> [*</xsl:text> <xsl:text> [*</xsl:text>
<xsl:value-of select="$name"/> <xsl:value-of select="$name"/>
<xsl:text>]]]&#xd; [&#xd; </xsl:text> <xsl:text>]]]&#xd; [&#xd; </xsl:text>
@ -1572,7 +1581,9 @@
<xsl:template name="typedef"> <xsl:template name="typedef">
<xsl:param name="class-name"/> <xsl:param name="class-name"/>
<xsl:text>```&#xd;using </xsl:text> <xsl:text>&#xd;```&#xd;</xsl:text>
<xsl:apply-templates select="templateparamlist" mode="class-detail"/>
<xsl:text>using </xsl:text>
<xsl:value-of select="name"/> <xsl:value-of select="name"/>
<xsl:text> = </xsl:text> <xsl:text> = </xsl:text>
<xsl:variable name="stripped-type"> <xsl:variable name="stripped-type">
@ -1583,7 +1594,8 @@
<xsl:if test="string-length($stripped-type) &gt; 0"> <xsl:if test="string-length($stripped-type) &gt; 0">
<xsl:value-of select="$stripped-type"/> <xsl:value-of select="$stripped-type"/>
</xsl:if> </xsl:if>
<xsl:text>;&#xd;```&#xd;</xsl:text> <xsl:text>;&#xd;</xsl:text>
<xsl:text>```&#xd;</xsl:text>
<xsl:if test="count(type/ref) &gt; 0 and not(contains(type, '*'))"> <xsl:if test="count(type/ref) &gt; 0 and not(contains(type, '*'))">
<xsl:variable name="class-refid"> <xsl:variable name="class-refid">
<xsl:for-each select="type/ref[1]"> <xsl:for-each select="type/ref[1]">
@ -1701,7 +1713,7 @@
</xsl:template> </xsl:template>
<!-- Template parameter list synopsis -->
<xsl:template match="templateparamlist" mode="class-detail"> <xsl:template match="templateparamlist" mode="class-detail">
<xsl:text>template&lt;&#xd;</xsl:text> <xsl:text>template&lt;&#xd;</xsl:text>
<xsl:apply-templates select="param" mode="class-detail-template"/> <xsl:apply-templates select="param" mode="class-detail-template"/>
@ -1712,31 +1724,45 @@
<xsl:template match="param" mode="class-detail-template"> <xsl:template match="param" mode="class-detail-template">
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<!-- Normalize 'class', 'class...' or NTTP type -->
<xsl:choose> <xsl:choose>
<!-- CLASS_DETAIL_TEMPLATE -->
<xsl:when test="declname = 'T'">
<xsl:value-of select="declname"/>
</xsl:when>
<xsl:when test="declname = 'T1'">
<xsl:value-of select="declname"/>
</xsl:when>
<xsl:when test="declname = 'TN'">
<xsl:value-of select="declname"/>
</xsl:when>
<xsl:when test="count(declname) &gt; 0"> <xsl:when test="count(declname) &gt; 0">
<xsl:value-of select="type"/> <xsl:value-of select="type"/>
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<xsl:value-of select="declname"/> </xsl:when>
<xsl:when test="starts-with(type, 'class ')">
<xsl:text>class </xsl:text>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="type"/> <xsl:text>[role red error.class-detail-template.1]</xsl:text>
<!--<xsl:value-of select="concat(' ``[link beast.ref.', declname, ' ', declname, ']``')"/>-->
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
<!-- Normalize the <param> -->
<xsl:variable name="normal-tparam">
<xsl:choose>
<xsl:when test="count(declname) &gt; 0">
<xsl:value-of select="declname"/>
</xsl:when>
<xsl:when test="starts-with(type, 'class ')">
<xsl:value-of select="substring(type, 7)"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>[role red error.class-detail-template.2]</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<!-- CLASS_DETAIL_TEMPLATE -->
<xsl:otherwise>
<xsl:value-of select="$normal-tparam"/>
</xsl:otherwise>
</xsl:choose>
<!-- default template parameter value -->
<xsl:if test="count(defval) &gt; 0"> <xsl:if test="count(defval) &gt; 0">
<xsl:text> = </xsl:text> <xsl:text> = </xsl:text>
<xsl:value-of select="defval"/> <xsl:value-of select="defval"/>
</xsl:if> </xsl:if>
<!-- comma separator -->
<xsl:if test="not(position() = last())"> <xsl:if test="not(position() = last())">
<xsl:text>,&#xd;</xsl:text> <xsl:text>,&#xd;</xsl:text>
</xsl:if> </xsl:if>
@ -1909,11 +1935,15 @@
</xsl:call-template> </xsl:call-template>
</xsl:if> </xsl:if>
<xsl:choose> <xsl:choose>
<!-- Handles using/typedef at namespace scope -->
<xsl:when test="@kind='typedef'"> <xsl:when test="@kind='typedef'">
<xsl:call-template name="typedef"> <xsl:call-template name="typedef">
<xsl:with-param name="class-name" select="$name"/> <xsl:with-param name="class-name" select="$name"/>
</xsl:call-template> </xsl:call-template>
<xsl:text>&#xd;[heading Description]&#xd;</xsl:text>
<xsl:apply-templates select="detaileddescription" mode="markup"/>
</xsl:when> </xsl:when>
<!-- Everything else at namespace scope-->
<xsl:otherwise> <xsl:otherwise>
<xsl:choose> <xsl:choose>
<xsl:when test="@kind='variable'"> <xsl:when test="@kind='variable'">

View File

@ -37,6 +37,10 @@
[def __Asio__ [@boost:/libs/asio/index.html Boost.Asio]] [def __Asio__ [@boost:/libs/asio/index.html Boost.Asio]]
[def __async_initfn__ [@boost:/doc/html/boost_asio/reference/asynchronous_operations.html initiating function]] [def __async_initfn__ [@boost:/doc/html/boost_asio/reference/asynchronous_operations.html initiating function]]
[/ C++ Named Requirements ]
[def __Allocator__ [@https://en.cppreference.com/w/cpp/named_req/Allocator ['Allocator]]]
[/ Networking Identifiers ] [/ Networking Identifiers ]
[def __asio_handler_allocate__ [@boost:/doc/html/boost_asio/reference/asio_handler_allocate.html `asio_handler_allocate`]] [def __asio_handler_allocate__ [@boost:/doc/html/boost_asio/reference/asio_handler_allocate.html `asio_handler_allocate`]]
@ -70,6 +74,8 @@
[def __ConstBufferSequence__ [@boost:/doc/html/boost_asio/reference/ConstBufferSequence.html ['ConstBufferSequence]]] [def __ConstBufferSequence__ [@boost:/doc/html/boost_asio/reference/ConstBufferSequence.html ['ConstBufferSequence]]]
[def __EndpointSequence__ [@boost:/doc/html/boost_asio/reference/EndpointSequence.html ['EndpointSequence]]] [def __EndpointSequence__ [@boost:/doc/html/boost_asio/reference/EndpointSequence.html ['EndpointSequence]]]
[def __Executor__ [@boost:/doc/html/boost_asio/reference/Executor1.html ['Executor]]] [def __Executor__ [@boost:/doc/html/boost_asio/reference/Executor1.html ['Executor]]]
[def __Executor1__ [@boost:/doc/html/boost_asio/reference/Executor1.html ['Executor1]]]
[def __Executor2__ [@boost:/doc/html/boost_asio/reference/Executor1.html ['Executor2]]]
[def __ExecutionContext__ [@boost:/doc/html/boost_asio/reference/ExecutionContext.html ['ExecutionContext]]] [def __ExecutionContext__ [@boost:/doc/html/boost_asio/reference/ExecutionContext.html ['ExecutionContext]]]
[def __Handler__ [@boost:/doc/html/boost_asio/reference/Handler.html ['Handler]]] [def __Handler__ [@boost:/doc/html/boost_asio/reference/Handler.html ['Handler]]]
[def __IteratorConnectHandler__ [@boost:/doc/html/boost_asio/reference/IteratorConnectHandler.html ['IteratorConnectHandler]]] [def __IteratorConnectHandler__ [@boost:/doc/html/boost_asio/reference/IteratorConnectHandler.html ['IteratorConnectHandler]]]

View File

@ -30,22 +30,19 @@
<member><link linkend="beast.ref.boost__beast__file_posix">file_posix</link></member> <member><link linkend="beast.ref.boost__beast__file_posix">file_posix</link></member>
<member><link linkend="beast.ref.boost__beast__file_stdio">file_stdio</link></member> <member><link linkend="beast.ref.boost__beast__file_stdio">file_stdio</link></member>
<member><link linkend="beast.ref.boost__beast__file_win32">file_win32</link></member> <member><link linkend="beast.ref.boost__beast__file_win32">file_win32</link></member>
<member><link linkend="beast.ref.boost__beast__flat_buffer">flat_buffer</link></member>
<member><link linkend="beast.ref.boost__beast__flat_static_buffer">flat_static_buffer</link></member>
<member><link linkend="beast.ref.boost__beast__flat_static_buffer_base">flat_static_buffer_base</link></member>
<member><link linkend="beast.ref.boost__beast__flat_stream">flat_stream</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member> <member><link linkend="beast.ref.boost__beast__flat_stream">flat_stream</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>
<member><link linkend="beast.ref.boost__beast__handler_ptr">handler_ptr</link></member> <member><link linkend="beast.ref.boost__beast__handler_ptr">handler_ptr</link></member>
<member><link linkend="beast.ref.boost__beast__iequal">iequal</link></member> <member><link linkend="beast.ref.boost__beast__iequal">iequal</link></member>
<member><link linkend="beast.ref.boost__beast__iless">iless</link></member> <member><link linkend="beast.ref.boost__beast__iless">iless</link></member>
<member><link linkend="beast.ref.boost__beast__rate_policy_access">rate_policy_access</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member> <member><link linkend="beast.ref.boost__beast__rate_policy_access">rate_policy_access</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>
<member><link linkend="beast.ref.boost__beast__saved_handler">saved_handler</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member> <member><link linkend="beast.ref.boost__beast__saved_handler">saved_handler</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>
<member><link linkend="beast.ref.boost__beast__simple_rate_policy">simple_rate_policy</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>
</simplelist> </simplelist>
</entry> </entry>
<entry valign="top"> <entry valign="top">
<bridgehead renderas="sect3">Classes&nbsp;<emphasis role="normal">(2 of 2)</emphasis></bridgehead> <bridgehead renderas="sect3">Classes&nbsp;<emphasis role="normal">(2 of 2)</emphasis></bridgehead>
<simplelist type="vert" columns="1"> <simplelist type="vert" columns="1">
<member><link linkend="beast.ref.boost__beast__span">span</link></member> <member><link linkend="beast.ref.boost__beast__span">span</link></member>
<member><link linkend="beast.ref.boost__beast__simple_rate_policy">simple_rate_policy</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>
<member><link linkend="beast.ref.boost__beast__static_string">static_string</link></member> <member><link linkend="beast.ref.boost__beast__static_string">static_string</link></member>
<member><link linkend="beast.ref.boost__beast__stable_async_base">stable_async_base</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member> <member><link linkend="beast.ref.boost__beast__stable_async_base">stable_async_base</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>
<member><link linkend="beast.ref.boost__beast__string_param">string_param</link></member> <member><link linkend="beast.ref.boost__beast__string_param">string_param</link></member>
@ -137,6 +134,9 @@
<member><link linkend="beast.ref.boost__beast__buffers_prefix_view">buffers_prefix_view</link></member> <member><link linkend="beast.ref.boost__beast__buffers_prefix_view">buffers_prefix_view</link></member>
<member><link linkend="beast.ref.boost__beast__buffers_suffix">buffers_suffix</link></member> <member><link linkend="beast.ref.boost__beast__buffers_suffix">buffers_suffix</link></member>
<member><link linkend="beast.ref.boost__beast__dynamic_buffer_ref_wrapper">dynamic_buffer_ref_wrapper</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member> <member><link linkend="beast.ref.boost__beast__dynamic_buffer_ref_wrapper">dynamic_buffer_ref_wrapper</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>
<member><link linkend="beast.ref.boost__beast__flat_buffer">flat_buffer</link></member>
<member><link linkend="beast.ref.boost__beast__flat_static_buffer">flat_static_buffer</link></member>
<member><link linkend="beast.ref.boost__beast__flat_static_buffer_base">flat_static_buffer_base</link></member>
<member><link linkend="beast.ref.boost__beast__multi_buffer">multi_buffer</link></member> <member><link linkend="beast.ref.boost__beast__multi_buffer">multi_buffer</link></member>
<member><link linkend="beast.ref.boost__beast__static_buffer">static_buffer</link></member> <member><link linkend="beast.ref.boost__beast__static_buffer">static_buffer</link></member>
<member><link linkend="beast.ref.boost__beast__static_buffer_base">static_buffer_base</link></member> <member><link linkend="beast.ref.boost__beast__static_buffer_base">static_buffer_base</link></member>

View File

@ -1,6 +1,8 @@
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the input files # Configuration options related to the input files
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
#INPUT = $(LIB_DIR)/include/boost/beast/_experimental/http/icy_stream.hpp
INPUT = \ INPUT = \
$(LIB_DIR)/include/boost/beast/ \ $(LIB_DIR)/include/boost/beast/ \
$(LIB_DIR)/include/boost/beast/_experimental/http \ $(LIB_DIR)/include/boost/beast/_experimental/http \
@ -11,6 +13,7 @@ INPUT = \
$(LIB_DIR)/include/boost/beast/websocket \ $(LIB_DIR)/include/boost/beast/websocket \
$(LIB_DIR)/include/boost/beast/zlib $(LIB_DIR)/include/boost/beast/zlib
ALIASES += esafe="@par Exception Safety"
INPUT_ENCODING = UTF-8 INPUT_ENCODING = UTF-8
FILE_PATTERNS = FILE_PATTERNS =
@ -79,7 +82,6 @@ MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4 TAB_SIZE = 4
ALIASES =
TCL_SUBST = TCL_SUBST =
OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO OPTIMIZE_OUTPUT_JAVA = NO

View File

@ -1,87 +1,36 @@
<!-- CLASS_DETAIL_TEMPLATE BEGIN --> <!-- CLASS_DETAIL_TEMPLATE BEGIN -->
<xsl:when test="type = 'class AsyncStream'"> <xsl:when test="$normal-tparam = 'Allocator'"> <xsl:text>__Allocator__</xsl:text></xsl:when>
<xsl:text>class __AsyncStream__</xsl:text> <xsl:when test="$normal-tparam = 'AsyncStream'"> <xsl:text>__AsyncStream__</xsl:text></xsl:when>
</xsl:when> <xsl:when test="$normal-tparam = 'AsyncReadStream'"> <xsl:text>__AsyncReadStream__</xsl:text></xsl:when>
<xsl:when test="type = 'class AsyncReadStream'"> <xsl:when test="$normal-tparam = 'AsyncWriteStream'"> <xsl:text>__AsyncWriteStream__</xsl:text></xsl:when>
<xsl:text>class __AsyncReadStream__</xsl:text> <xsl:when test="$normal-tparam = 'Body'"> <xsl:text>__Body__</xsl:text></xsl:when>
</xsl:when> <xsl:when test="$normal-tparam = 'BufferSequence'"> <xsl:text>__BufferSequence__</xsl:text></xsl:when>
<xsl:when test="type = 'class AsyncWriteStream'"> <xsl:when test="$normal-tparam = 'BufferSequence'"> <xsl:text>__BufferSequence__</xsl:text></xsl:when>
<xsl:text>class __AsyncWriteStream__</xsl:text> <xsl:when test="$normal-tparam = 'CompletionCondition'"> <xsl:text>__CompletionCondition__</xsl:text></xsl:when>
</xsl:when> <xsl:when test="$normal-tparam = 'CompletionHandler'"> <xsl:text>__CompletionHandler__</xsl:text></xsl:when>
<xsl:when test="type = 'class Body'"> <xsl:when test="$normal-tparam = 'CompletionToken'"> <xsl:text>__CompletionToken__</xsl:text></xsl:when>
<xsl:text>class __Body__</xsl:text> <xsl:when test="$normal-tparam = 'ConnectCondition'"> <xsl:text>__ConnectCondition__</xsl:text></xsl:when>
</xsl:when> <xsl:when test="$normal-tparam = 'ConnectHandler'"> <xsl:text>__ConnectHandler__</xsl:text></xsl:when>
<xsl:when test="type = 'class BufferSequence'"> <xsl:when test="$normal-tparam = 'ConstBufferSequence'"> <xsl:text>__ConstBufferSequence__</xsl:text></xsl:when>
<xsl:text>class __BufferSequence__</xsl:text> <xsl:when test="$normal-tparam = 'DynamicBuffer'"> <xsl:text>__DynamicBuffer__</xsl:text></xsl:when>
</xsl:when> <xsl:when test="$normal-tparam = 'EndpointSequence'"> <xsl:text>__EndpointSequence__</xsl:text></xsl:when>
<xsl:when test="(type = 'class' or type = 'class...') and declname = 'BufferSequence'"> <xsl:when test="$normal-tparam = 'ExecutionContext'"> <xsl:text>__ExecutionContext__</xsl:text></xsl:when>
<xsl:value-of select="type"/> <xsl:when test="$normal-tparam = 'Executor'"> <xsl:text>__Executor__</xsl:text></xsl:when>
<xsl:text> __BufferSequence__</xsl:text> <xsl:when test="$normal-tparam = 'Executor_'"> <xsl:text>__Executor__</xsl:text></xsl:when>
</xsl:when> <xsl:when test="$normal-tparam = 'Executor1'"> <xsl:text>__Executor1__</xsl:text></xsl:when>
<xsl:when test="declname = 'CompletionCondition' or type = 'class CompletionCondition'"> <xsl:when test="$normal-tparam = 'Executor2'"> <xsl:text>__Executor2__</xsl:text></xsl:when>
<xsl:text>class __CompletionCondition__</xsl:text> <xsl:when test="$normal-tparam = 'Fields'"> <xsl:text>__Fields__</xsl:text></xsl:when>
</xsl:when> <xsl:when test="$normal-tparam = 'Handler'"> <xsl:text>__Handler__</xsl:text></xsl:when>
<xsl:when test="declname = 'CompletionHandler' or type = 'class CompletionHandler'"> <xsl:when test="$normal-tparam = 'Handler_'"> <xsl:text>__Handler__</xsl:text></xsl:when>
<xsl:text>class __CompletionHandler__</xsl:text> <xsl:when test="$normal-tparam = 'IteratorConnectHandler'"> <xsl:text>__IteratorConnectHandler__</xsl:text></xsl:when>
</xsl:when> <xsl:when test="$normal-tparam = 'MutableBufferSequence'"> <xsl:text>__MutableBufferSequence__</xsl:text></xsl:when>
<xsl:when test="type = 'class ConnectCondition'"> <xsl:when test="$normal-tparam = 'Protocol'"> <xsl:text>__Protocol__</xsl:text></xsl:when>
<xsl:text>class __ConnectCondition__</xsl:text> <xsl:when test="$normal-tparam = 'RangeConnectHandler'"> <xsl:text>__RangeConnectHandler__</xsl:text></xsl:when>
</xsl:when> <xsl:when test="$normal-tparam = 'RatePolicy'"> <xsl:text>__RatePolicy__</xsl:text></xsl:when>
<xsl:when test="type = 'class ConnectHandler'"> <xsl:when test="$normal-tparam = 'ReadHandler'"> <xsl:text>__ReadHandler__</xsl:text></xsl:when>
<xsl:text>class __ConnectHandler__</xsl:text> <xsl:when test="$normal-tparam = 'Stream'"> <xsl:text>__Stream__</xsl:text></xsl:when>
</xsl:when> <xsl:when test="$normal-tparam = 'SyncStream'"> <xsl:text>__SyncStream__</xsl:text></xsl:when>
<xsl:when test="declname = 'ConstBufferSequence' or type = 'class ConstBufferSequence'"> <xsl:when test="$normal-tparam = 'SyncReadStream'"> <xsl:text>__SyncReadStream__</xsl:text></xsl:when>
<xsl:text>class __ConstBufferSequence__</xsl:text> <xsl:when test="$normal-tparam = 'SyncWriteStream'"> <xsl:text>__SyncWriteStream__</xsl:text></xsl:when>
</xsl:when> <xsl:when test="$normal-tparam = 'WriteHandler'"> <xsl:text>__WriteHandler__</xsl:text></xsl:when>
<xsl:when test="declname = 'DynamicBuffer' or type = 'class DynamicBuffer'">
<xsl:text>class __DynamicBuffer__</xsl:text>
</xsl:when>
<xsl:when test="type = 'class EndpointSequence'">
<xsl:text>class __EndpointSequence__</xsl:text>
</xsl:when>
<xsl:when test="type = 'class ExecutionContext'">
<xsl:text>class __ExecutionContext__</xsl:text>
</xsl:when>
<xsl:when test="type = 'class Executor'">
<xsl:text>class __Executor__</xsl:text>
</xsl:when>
<xsl:when test="type = 'class Fields' or substring(type, 1, 13) = 'class Fields '">
<xsl:text>class __Fields__</xsl:text>
</xsl:when>
<xsl:when test="declname = 'Handler' or type = 'class Handler'">
<xsl:text>class __Handler__</xsl:text>
</xsl:when>
<xsl:when test="type = 'class IteratorConnectHandler'">
<xsl:text>class __IteratorConnectHandler__</xsl:text>
</xsl:when>
<xsl:when test="declname = 'MutableBufferSequence' or type = 'class MutableBufferSequence'">
<xsl:text>class __MutableBufferSequence__</xsl:text>
</xsl:when>
<xsl:when test="type = 'class Protocol'">
<xsl:text>class __Protocol__</xsl:text>
</xsl:when>
<xsl:when test="type = 'class RangeConnectHandler'">
<xsl:text>class __RangeConnectHandler__</xsl:text>
</xsl:when>
<xsl:when test="type = 'class RatePolicy'">
<xsl:text>class __RatePolicy__</xsl:text>
</xsl:when>
<xsl:when test="declname = 'ReadHandler' or type = 'class ReadHandler'">
<xsl:text>class __ReadHandler__</xsl:text>
</xsl:when>
<xsl:when test="declname = 'Stream' or type = 'class Stream'">
<xsl:text>class __Stream__</xsl:text>
</xsl:when>
<xsl:when test="type = 'class SyncStream'">
<xsl:text>class __SyncStream__</xsl:text>
</xsl:when>
<xsl:when test="declname = 'SyncReadStream' or type = 'class SyncReadStream'">
<xsl:text>class __SyncReadStream__</xsl:text>
</xsl:when>
<xsl:when test="declname = 'SyncWriteStream' or type = 'class SyncWriteStream'">
<xsl:text>class __SyncWriteStream__</xsl:text>
</xsl:when>
<xsl:when test="declname = 'WriteHandler' or type = 'class WriteHandler'">
<xsl:text>class __WriteHandler__</xsl:text>
</xsl:when>
<!-- CLASS_DETAIL_TEMPLATE END --> <!-- CLASS_DETAIL_TEMPLATE END -->

View File

@ -61,7 +61,7 @@ async_echo (AsyncStream& stream, DynamicBuffer& buffer, CompletionToken&& token)
to provide the implementation with any leftover bytes. to provide the implementation with any leftover bytes.
@param stream The stream to operate on. The type must meet the @param stream The stream to operate on. The type must meet the
requirements of @b AsyncReadStream and @AsyncWriteStream requirements of <em>AsyncReadStream</em> and @AsyncWriteStream
@param buffer A dynamic buffer to hold implementation-defined @param buffer A dynamic buffer to hold implementation-defined
temporary data. Ownership is not transferred; the caller is temporary data. Ownership is not transferred; the caller is

View File

@ -39,26 +39,23 @@ namespace http {
operations are performed within the same implicit or explicit strand. operations are performed within the same implicit or explicit strand.
@par Example @par Example
To use the @ref icy_stream template with an @ref tcp_stream To use the @ref icy_stream template with an @ref tcp_stream
you would write: you would write:
@code @code
http::icy_stream<tcp_stream> is(ioc); http::icy_stream<tcp_stream> is(ioc);
@endcode @endcode
@tparam NextLayer The type representing the next layer, to which @tparam NextLayer The type representing the next layer, to which
data will be read and written during operations. For synchronous data will be read and written during operations. For synchronous
operations, the type must support the @b SyncStream concept. operations, the type must support the <em>SyncStream</em> concept.
For asynchronous operations, the type must support the For asynchronous operations, the type must support the
@b AsyncStream concept. <em>AsyncStream</em> concept.
@note A stream object must not be moved or destroyed while there @note A stream object must not be moved or destroyed while there
are pending asynchronous operations associated with it. are pending asynchronous operations associated with it.
@par Concepts @par Concepts
@b AsyncStream, <em>AsyncStream</em>, <em>SyncStream</em>
@b SyncStream
*/ */
template<class NextLayer> template<class NextLayer>
class icy_stream class icy_stream
@ -208,12 +205,12 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code
@code void handler( void handler(
const boost::system::error_code& error, // Result of operation. const boost::system::error_code& error, // Result of operation.
std::size_t bytes_transferred // Number of bytes read. std::size_t bytes_transferred // Number of bytes read.
); @endcode );
@endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -288,14 +285,12 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error, // Result of operation. error_code const& error, // Result of operation.
std::size_t bytes_transferred // Number of bytes written. std::size_t bytes_transferred // Number of bytes written.
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a

View File

@ -29,7 +29,7 @@ namespace test {
not instantiated directly; instances of this class are returned not instantiated directly; instances of this class are returned
by the helper functions listed below. by the helper functions listed below.
@see @ref success_handler, @ref fail_handler, @ref any_handler @see success_handler, @ref fail_handler, @ref any_handler
*/ */
class handler class handler
{ {

View File

@ -91,10 +91,10 @@ namespace test {
operations are performed within the same implicit or explicit strand. operations are performed within the same implicit or explicit strand.
@par Concepts @par Concepts
@li @b SyncReadStream @li <em>SyncReadStream</em>
@li @b SyncWriteStream @li <em>SyncWriteStream</em>
@li @b AsyncReadStream @li <em>AsyncReadStream</em>
@li @b AsyncWriteStream @li <em>AsyncWriteStream</em>
*/ */
class stream class stream
{ {
@ -412,14 +412,12 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec, // Result of operation. error_code const& ec, // Result of operation.
std::size_t bytes_transferred // Number of bytes read. std::size_t bytes_transferred // Number of bytes read.
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -490,14 +488,12 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec, // Result of operation. error_code const& ec, // Result of operation.
std::size_t bytes_transferred // Number of bytes written. std::size_t bytes_transferred // Number of bytes written.
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a

View File

@ -29,7 +29,7 @@
namespace boost { namespace boost {
namespace beast { namespace beast {
/** Base class to provide completion handler boilerplate for composed operations. /** Base class to assist writing composed operations.
A function object submitted to intermediate initiating functions during A function object submitted to intermediate initiating functions during
a composed operation may derive from this type to inherit all of the a composed operation may derive from this type to inherit all of the
@ -169,7 +169,7 @@ namespace beast {
not default constructible, an instance of the type must be provided not default constructible, an instance of the type must be provided
upon construction. upon construction.
@see @ref stable_async_base @see stable_async_base
*/ */
template< template<
class Handler, class Handler,
@ -377,43 +377,10 @@ public:
} }
#if ! BOOST_BEAST_DOXYGEN #if ! BOOST_BEAST_DOXYGEN
template< Handler*
class Handler_, get_legacy_handler_pointer() noexcept
class Executor1_,
class Allocator_,
class Function>
friend
void asio_handler_invoke(
Function&& f,
async_base<
Handler_, Executor1_, Allocator_>* p);
friend
void* asio_handler_allocate(
std::size_t size, async_base* p)
{ {
using net::asio_handler_allocate; return std::addressof(h_);
return asio_handler_allocate(
size, std::addressof(p->h_));
}
friend
void asio_handler_deallocate(
void* mem, std::size_t size,
async_base* p)
{
using net::asio_handler_deallocate;
asio_handler_deallocate(mem, size,
std::addressof(p->h_));
}
friend
bool asio_handler_is_continuation(
async_base* p)
{
using net::asio_handler_is_continuation;
return asio_handler_is_continuation(
std::addressof(p->h_));
} }
#endif #endif
}; };
@ -701,63 +668,19 @@ public:
Args&&... args); Args&&... args);
}; };
#if ! BOOST_BEAST_DOXYGEN
template<
class Handler,
class Executor1,
class Allocator,
class Function>
void asio_handler_invoke(
Function&& f,
async_base<
Handler, Executor1, Allocator>* p)
{
using net::asio_handler_invoke;
asio_handler_invoke(
f, std::addressof(p->h_));
}
#endif
namespace detail {
template<class State, class Allocator>
struct allocate_stable_state final
: stable_base
, boost::empty_value<Allocator>
{
State value;
template<class... Args>
explicit
allocate_stable_state(
Allocator const& alloc,
Args&&... args)
: boost::empty_value<Allocator>(
boost::empty_init_t{}, alloc)
, value{std::forward<Args>(args)...}
{
}
void destroy() override
{
using A = typename allocator_traits<
Allocator>::template rebind_alloc<
allocate_stable_state>;
A a(this->get());
detail::allocator_traits<A>::destroy(a, this);
detail::allocator_traits<A>::deallocate(a, this, 1);
}
};
} // detail
/** Allocate a temporary object to hold stable asynchronous operation state. /** Allocate a temporary object to hold stable asynchronous operation state.
The object will be destroyed just before the completion The object will be destroyed just before the completion
handler is invoked, or when the base is destroyed. handler is invoked, or when the base is destroyed.
@see @ref stable_async_base @tparam State The type of object to allocate.
@param base The helper to allocate from.
@param args An optional list of parameters to forward to the
constructor of the object being allocated.
@see stable_async_base
*/ */
template< template<
class State, class State,
@ -769,43 +692,11 @@ State&
allocate_stable( allocate_stable(
stable_async_base< stable_async_base<
Handler, Executor1, Allocator>& base, Handler, Executor1, Allocator>& base,
Args&&... args) Args&&... args);
{
using allocator_type = typename stable_async_base<
Handler, Executor1, Allocator>::allocator_type;
using A = typename detail::allocator_traits<
allocator_type>::template rebind_alloc<
detail::allocate_stable_state<
State, allocator_type>>;
struct deleter
{
allocator_type alloc;
detail::allocate_stable_state<
State, allocator_type>* ptr;
~deleter()
{
if(ptr)
{
A a(alloc);
detail::allocator_traits<A>::deallocate(a, ptr, 1);
}
}
};
A a(base.get_allocator());
deleter d{base.get_allocator(), nullptr};
d.ptr = detail::allocator_traits<A>::allocate(a, 1);
detail::allocator_traits<A>::construct(a, d.ptr,
d.alloc, std::forward<Args>(args)...);
d.ptr->next_ = base.list_;
base.list_ = d.ptr;
return boost::exchange(d.ptr, nullptr)->value;
}
} // beast } // beast
} // boost } // boost
#include <boost/beast/core/impl/async_base.hpp>
#endif #endif

View File

@ -516,7 +516,7 @@ public:
@throws system_error Thrown on failure. @throws system_error Thrown on failure.
@see @ref connect @see connect
*/ */
void void
connect(endpoint_type const& ep) connect(endpoint_type const& ep)
@ -537,7 +537,7 @@ public:
@param ec Set to indicate what error occurred, if any. @param ec Set to indicate what error occurred, if any.
@see @ref connect @see connect
*/ */
void void
connect(endpoint_type const& ep, error_code& ec) connect(endpoint_type const& ep, error_code& ec)
@ -890,19 +890,17 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code ec // Result of operation error_code ec // Result of operation
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
manner equivalent to using `net::post`. manner equivalent to using `net::post`.
@see @ref async_connect @see async_connect
*/ */
template<class ConnectHandler> template<class ConnectHandler>
BOOST_BEAST_ASYNC_RESULT1(ConnectHandler) BOOST_BEAST_ASYNC_RESULT1(ConnectHandler)
@ -934,7 +932,6 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
// Result of operation. if the sequence is empty, set to // Result of operation. if the sequence is empty, set to
@ -947,7 +944,6 @@ public:
typename Protocol::endpoint const& endpoint typename Protocol::endpoint const& endpoint
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -1004,7 +1000,6 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
// Result of operation. if the sequence is empty, set to // Result of operation. if the sequence is empty, set to
@ -1017,7 +1012,6 @@ public:
typename Protocol::endpoint const& endpoint typename Protocol::endpoint const& endpoint
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -1082,7 +1076,6 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
// Result of operation. if the sequence is empty, set to // Result of operation. if the sequence is empty, set to
@ -1095,7 +1088,6 @@ public:
Iterator iterator Iterator iterator
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -1138,7 +1130,6 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
// Result of operation. if the sequence is empty, set to // Result of operation. if the sequence is empty, set to
@ -1151,7 +1142,6 @@ public:
Iterator iterator Iterator iterator
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -1262,14 +1252,12 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code error, // Result of operation. error_code error, // Result of operation.
std::size_t bytes_transferred // Number of bytes read. std::size_t bytes_transferred // Number of bytes read.
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -1381,14 +1369,12 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code error, // Result of operation. error_code error, // Result of operation.
std::size_t bytes_transferred // Number of bytes written. std::size_t bytes_transferred // Number of bytes written.
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a

View File

@ -28,18 +28,16 @@ namespace beast {
will be `std::true_type` if each specified type meets the requirements, will be `std::true_type` if each specified type meets the requirements,
otherwise, this type alias will be `std::false_type`. otherwise, this type alias will be `std::false_type`.
@tparam TN A list of zero or more types to check. If this list is @tparam BufferSequence A list of zero or more types to check. If this
empty, the resulting type alias will be `std::true_type`. list is empty, the resulting type alias will be `std::true_type`.
*/ */
template<class... BufferSequence>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class... TN> using is_const_buffer_sequence = __see_below__;
struct is_const_buffer_sequence : __see_below__ {};
//using is_const_buffer_sequence = __see_below__;
#else #else
template<class... TN>
using is_const_buffer_sequence = mp11::mp_all< using is_const_buffer_sequence = mp11::mp_all<
net::is_const_buffer_sequence< net::is_const_buffer_sequence<
typename std::decay<TN>::type>...>; typename std::decay<BufferSequence>::type>...>;
#endif #endif
/** Determine if a list of types satisfy the <em>MutableBufferSequence</em> requirements. /** Determine if a list of types satisfy the <em>MutableBufferSequence</em> requirements.
@ -49,18 +47,16 @@ using is_const_buffer_sequence = mp11::mp_all<
will be `std::true_type` if each specified type meets the requirements, will be `std::true_type` if each specified type meets the requirements,
otherwise, this type alias will be `std::false_type`. otherwise, this type alias will be `std::false_type`.
@tparam TN A list of zero or more types to check. If this list is @tparam BufferSequence A list of zero or more types to check. If this
empty, the resulting type alias will be `std::true_type`. list is empty, the resulting type alias will be `std::true_type`.
*/ */
template<class... BufferSequence>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class... TN> using is_mutable_buffer_sequence = __see_below__;
struct is_mutable_buffer_sequence : __see_below__ {};
//using is_mutable_buffer_sequence = __see_below__;
#else #else
template<class... TN>
using is_mutable_buffer_sequence = mp11::mp_all< using is_mutable_buffer_sequence = mp11::mp_all<
net::is_mutable_buffer_sequence< net::is_mutable_buffer_sequence<
typename std::decay<TN>::type>...>; typename std::decay<BufferSequence>::type>...>;
#endif #endif
/** Type alias for the underlying buffer type of a list of buffer sequence types. /** Type alias for the underlying buffer type of a list of buffer sequence types.
@ -93,16 +89,15 @@ using is_mutable_buffer_sequence = mp11::mp_all<
} }
@endcode @endcode
@tparam TN A list of zero or more types to check. If this list is @tparam BufferSequence A list of zero or more types to check. If this
empty, the resulting type alias will be `net::mutable_buffer`. list is empty, the resulting type alias will be `net::mutable_buffer`.
*/ */
template<class... TN> template<class... BufferSequence>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
struct buffers_type : __see_below__ {}; using buffers_type = __see_below__;
//using buffers_type = __see_below__;
#else #else
using buffers_type = typename std::conditional< using buffers_type = typename std::conditional<
is_mutable_buffer_sequence<TN...>::value, is_mutable_buffer_sequence<BufferSequence...>::value,
net::mutable_buffer, net::const_buffer>::type; net::mutable_buffer, net::const_buffer>::type;
#endif #endif
@ -115,18 +110,17 @@ using buffers_type = typename std::conditional<
type alias will be equal to the iterator type used by type alias will be equal to the iterator type used by
the buffer sequence. the buffer sequence.
*/ */
template <class T> template <class BufferSequence>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
struct buffers_iterator_type : __see_below__ {}; using buffers_iterator_type = __see_below__;
//using buffers_iterator_type = __see_below__;
#elif BOOST_WORKAROUND(BOOST_MSVC, < 1910) #elif BOOST_WORKAROUND(BOOST_MSVC, < 1910)
using buffers_iterator_type = typename using buffers_iterator_type = typename
detail::buffers_iterator_type_helper< detail::buffers_iterator_type_helper<
typename std::decay<T>::type>::type; typename std::decay<BufferSequence>::type>::type;
#else #else
using buffers_iterator_type = using buffers_iterator_type =
decltype(net::buffer_sequence_begin( decltype(net::buffer_sequence_begin(
std::declval<T const&>())); std::declval<BufferSequence const&>()));
#endif #endif
/** Return the total number of bytes in a buffer or buffer sequence /** Return the total number of bytes in a buffer or buffer sequence
@ -152,17 +146,14 @@ using buffers_iterator_type =
In addition this handles types which are convertible to In addition this handles types which are convertible to
`net::const_buffer`; these are not handled by `net::buffer_size`. `net::const_buffer`; these are not handled by `net::buffer_size`.
@note It is expected that a future version of Networking will
incorporate the features of this function.
@param buffers The buffer or buffer sequence to calculate the size of. @param buffers The buffer or buffer sequence to calculate the size of.
@return The total number of bytes in the buffer or sequence. @return The total number of bytes in the buffer or sequence.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class Buffers> template<class BufferSequence>
void std::size_t
buffer_bytes(Buffers const& buffers); buffer_bytes(BufferSequence const& buffers);
#else #else
BOOST_BEAST_INLINE_VARIABLE(buffer_bytes, detail::buffer_bytes_impl) BOOST_BEAST_INLINE_VARIABLE(buffer_bytes, detail::buffer_bytes_impl)
#endif #endif

View File

@ -23,11 +23,11 @@
namespace boost { namespace boost {
namespace beast { namespace beast {
/** A @b Stream with attached @b DynamicBuffer to buffer reads. /** A <em>Stream</em> with attached <em>DynamicBuffer</em> to buffer reads.
This wraps a @b Stream implementation so that calls to write are This wraps a <em>Stream</em> implementation so that calls to write are
passed through to the underlying stream, while calls to read will passed through to the underlying stream, while calls to read will
first consume the input sequence stored in a @b DynamicBuffer which first consume the input sequence stored in a <em>DynamicBuffer</em> which
is part of the object. is part of the object.
The use-case for this class is different than that of the The use-case for this class is different than that of the
@ -250,14 +250,12 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error, // result of operation error_code const& error, // result of operation
std::size_t bytes_transferred // number of bytes transferred std::size_t bytes_transferred // number of bytes transferred
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -326,14 +324,12 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error, // result of operation error_code const& error, // result of operation
std::size_t bytes_transferred // number of bytes transferred std::size_t bytes_transferred // number of bytes transferred
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a

View File

@ -170,7 +170,7 @@ public:
@throws std::length_error if `size() + n` exceeds `max_size()`. @throws std::length_error if `size() + n` exceeds `max_size()`.
@par Exception Safety @esafe
Strong guarantee. Strong guarantee.
*/ */
@ -192,7 +192,7 @@ public:
is greater than the number of writable bytes, all is greater than the number of writable bytes, all
writable bytes are appended. writable bytes are appended.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -210,7 +210,7 @@ public:
is greater than the number of readable bytes, all is greater than the number of readable bytes, all
readable bytes are removed. readable bytes are removed.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */

View File

@ -20,7 +20,7 @@ namespace beast {
/** A buffer sequence representing a concatenation of buffer sequences. /** A buffer sequence representing a concatenation of buffer sequences.
@see @ref buffers_cat @see buffers_cat
*/ */
template<class... Buffers> template<class... Buffers>
class buffers_cat_view class buffers_cat_view
@ -85,7 +85,7 @@ public:
also a <em>MutableBufferSequence</em>; otherwise the returned buffer also a <em>MutableBufferSequence</em>; otherwise the returned buffer
sequence will be a <em>ConstBufferSequence</em>. sequence will be a <em>ConstBufferSequence</em>.
@see @ref buffers_cat_view @see buffers_cat_view
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class... BufferSequence> template<class... BufferSequence>

View File

@ -51,7 +51,7 @@ namespace beast {
sequence, the returned object will also meet the requirements of sequence, the returned object will also meet the requirements of
<em>MutableBufferSequence</em>. <em>MutableBufferSequence</em>.
@see @ref buffers_range_ref @see buffers_range_ref
*/ */
template<class BufferSequence> template<class BufferSequence>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
@ -104,7 +104,7 @@ buffers_range(BufferSequence const& buffers)
sequence, the returned object will also meet the requirements of sequence, the returned object will also meet the requirements of
<em>MutableBufferSequence</em>. <em>MutableBufferSequence</em>.
@see @ref buffers_range @see buffers_range
*/ */
template<class BufferSequence> template<class BufferSequence>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN

View File

@ -198,7 +198,6 @@ read(
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void void
handler( handler(
@ -211,7 +210,6 @@ read(
// prior to the error. // prior to the error.
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a

View File

@ -22,7 +22,7 @@ namespace beast {
/** An implementation of File. /** An implementation of File.
This alias is set to the best available implementation This alias is set to the best available implementation
of @b File given the platform and build settings. of <em>File</em> given the platform and build settings.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
struct file : file_stdio struct file : file_stdio

View File

@ -35,7 +35,7 @@ append_existing write-only exclusive sequential must exist
/** File open modes /** File open modes
These modes are used when opening files using These modes are used when opening files using
instances of the @b File concept. instances of the <em>File</em> concept.
@see file_stdio @see file_stdio
*/ */
@ -95,7 +95,7 @@ enum class file_mode
append_existing append_existing
}; };
/** Determine if `T` meets the requirements of @b File. /** Determine if `T` meets the requirements of <em>File</em>.
Metafunctions are used to perform compile time checking of template Metafunctions are used to perform compile time checking of template
types. This type will be `std::true_type` if `T` meets the requirements, types. This type will be `std::true_type` if `T` meets the requirements,

View File

@ -37,7 +37,7 @@ namespace beast {
/** An implementation of File for POSIX systems. /** An implementation of File for POSIX systems.
This class implements a @b File using POSIX interfaces. This class implements a <em>File</em> using POSIX interfaces.
*/ */
class file_posix class file_posix
{ {

View File

@ -34,7 +34,7 @@ namespace beast {
/** An implementation of File for Win32. /** An implementation of File for Win32.
This class implements a @b File using Win32 native interfaces. This class implements a <em>File</em> using Win32 native interfaces.
*/ */
class file_win32 class file_win32
{ {

View File

@ -31,7 +31,7 @@ namespace beast {
is provided to permit them to be efficiently used with is provided to permit them to be efficiently used with
I/O operations. I/O operations.
Objects of this type meet the requirements of @b DynamicBuffer Objects of this type meet the requirements of <em>DynamicBuffer</em>
and have the following additional properties: and have the following additional properties:
@li A mutable buffer sequence representing the readable @li A mutable buffer sequence representing the readable
@ -129,7 +129,7 @@ public:
@param alloc The allocator to use for the object. @param alloc The allocator to use for the object.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -145,7 +145,7 @@ public:
@param alloc The allocator to use for the object. @param alloc The allocator to use for the object.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -166,7 +166,7 @@ public:
moved-from object will have zero capacity, zero readable moved-from object will have zero capacity, zero readable
bytes, and zero writable bytes. bytes, and zero writable bytes.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -272,7 +272,7 @@ public:
the moved-from object will have zero capacity, zero readable the moved-from object will have zero capacity, zero readable
bytes, and zero writable bytes. bytes, and zero writable bytes.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -326,7 +326,7 @@ public:
@param n The maximum number of bytes ever allowed for capacity. @param n The maximum number of bytes ever allowed for capacity.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -348,7 +348,7 @@ public:
If this value is greater than the maximum size, then the If this value is greater than the maximum size, then the
maximum size will be adjusted upwards to this value. maximum size will be adjusted upwards to this value.
@par Exception Safety @esafe
Basic guarantee. Basic guarantee.
@ -363,7 +363,7 @@ public:
Buffer sequences previously obtained using @ref data or Buffer sequences previously obtained using @ref data or
@ref prepare become invalid. @ref prepare become invalid.
@par Exception Safety @esafe
Strong guarantee. Strong guarantee.
*/ */
@ -376,7 +376,7 @@ public:
Buffer sequences previously obtained using @ref data or Buffer sequences previously obtained using @ref data or
@ref prepare become invalid. @ref prepare become invalid.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -459,7 +459,7 @@ public:
@throws std::length_error if `size() + n` exceeds either @throws std::length_error if `size() + n` exceeds either
`max_size()` or the allocator's maximum allocation size. `max_size()` or the allocator's maximum allocation size.
@par Exception Safety @esafe
Strong guarantee. Strong guarantee.
*/ */
@ -480,7 +480,7 @@ public:
is greater than the number of writable bytes, all is greater than the number of writable bytes, all
writable bytes are appended. writable bytes are appended.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -501,7 +501,7 @@ public:
is greater than the number of readable bytes, all is greater than the number of readable bytes, all
readable bytes are removed. readable bytes are removed.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */

View File

@ -29,7 +29,7 @@ namespace beast {
is provided to permit them to be efficiently used with is provided to permit them to be efficiently used with
I/O operations. I/O operations.
Objects of this type meet the requirements of @b DynamicBuffer Objects of this type meet the requirements of <em>DynamicBuffer</em>
and have the following additional properties: and have the following additional properties:
@li A mutable buffer sequence representing the readable @li A mutable buffer sequence representing the readable
@ -46,7 +46,7 @@ namespace beast {
@ref flat_static_buffer; however, to reduce the number of template @ref flat_static_buffer; however, to reduce the number of template
instantiations, objects should be passed `flat_static_buffer_base&`. instantiations, objects should be passed `flat_static_buffer_base&`.
@see @ref flat_static_buffer @see flat_static_buffer
*/ */
class flat_static_buffer_base class flat_static_buffer_base
{ {
@ -84,7 +84,7 @@ public:
Buffer sequences previously obtained using @ref data or Buffer sequences previously obtained using @ref data or
@ref prepare become invalid. @ref prepare become invalid.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -175,7 +175,7 @@ public:
@throws std::length_error if `size() + n` exceeds `max_size()`. @throws std::length_error if `size() + n` exceeds `max_size()`.
@par Exception Safety @esafe
Strong guarantee. Strong guarantee.
*/ */
@ -197,7 +197,7 @@ public:
is greater than the number of writable bytes, all is greater than the number of writable bytes, all
writable bytes are appended. writable bytes are appended.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -218,7 +218,7 @@ public:
is greater than the number of readable bytes, all is greater than the number of readable bytes, all
readable bytes are removed. readable bytes are removed.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -246,7 +246,7 @@ protected:
@param n The number of valid bytes pointed to by `p`. @param n The number of valid bytes pointed to by `p`.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -265,7 +265,7 @@ private:
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/** A @b DynamicBuffer with a fixed size internal buffer. /** A <em>DynamicBuffer</em> with a fixed size internal buffer.
Buffer sequences returned by @ref data and @ref prepare Buffer sequences returned by @ref data and @ref prepare
will always be of length one. will always be of length one.
@ -277,7 +277,7 @@ private:
objects of this type in a deduced context, the signature of the objects of this type in a deduced context, the signature of the
receiving function should use @ref flat_static_buffer_base instead. receiving function should use @ref flat_static_buffer_base instead.
@see @ref flat_static_buffer_base @see flat_static_buffer_base
*/ */
template<std::size_t N> template<std::size_t N>
class flat_static_buffer : public flat_static_buffer_base class flat_static_buffer : public flat_static_buffer_base

View File

@ -235,14 +235,12 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error, // Result of operation. error_code const& error, // Result of operation.
std::size_t bytes_transferred // Number of bytes read. std::size_t bytes_transferred // Number of bytes read.
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -317,14 +315,12 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec, // Result of operation. error_code const& ec, // Result of operation.
std::size_t bytes_transferred // Number of bytes written. std::size_t bytes_transferred // Number of bytes written.
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a

View File

@ -103,7 +103,7 @@ public:
T::T(Handler const&, Args&&...) T::T(Handler const&, Args&&...)
@endcode @endcode
@par Exception Safety @esafe
Strong guarantee. Strong guarantee.
@param handler The handler to associate with the owned object. @param handler The handler to associate with the owned object.

View File

@ -0,0 +1,156 @@
//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/beast
//
#ifndef BOOST_BEAST_CORE_IMPL_ASYNC_BASE_HPP
#define BOOST_BEAST_CORE_IMPL_ASYNC_BASE_HPP
#include <boost/core/exchange.hpp>
namespace boost {
namespace beast {
namespace detail {
template<class State, class Allocator>
struct allocate_stable_state final
: stable_base
, boost::empty_value<Allocator>
{
State value;
template<class... Args>
explicit
allocate_stable_state(
Allocator const& alloc,
Args&&... args)
: boost::empty_value<Allocator>(
boost::empty_init_t{}, alloc)
, value{std::forward<Args>(args)...}
{
}
void destroy() override
{
using A = typename allocator_traits<
Allocator>::template rebind_alloc<
allocate_stable_state>;
A a(this->get());
detail::allocator_traits<A>::destroy(a, this);
detail::allocator_traits<A>::deallocate(a, this, 1);
}
};
} // detail
template<
class Handler,
class Executor1,
class Allocator,
class Function>
void asio_handler_invoke(
Function&& f,
async_base<Handler, Executor1, Allocator>* p)
{
using net::asio_handler_invoke;
asio_handler_invoke(f,
p->get_legacy_handler_pointer());
}
template<
class Handler,
class Executor1,
class Allocator>
void*
asio_handler_allocate(
std::size_t size,
async_base<Handler, Executor1, Allocator>* p)
{
using net::asio_handler_allocate;
return asio_handler_allocate(size,
p->get_legacy_handler_pointer());
}
template<
class Handler,
class Executor1,
class Allocator>
void
asio_handler_deallocate(
void* mem, std::size_t size,
async_base<Handler, Executor1, Allocator>* p)
{
using net::asio_handler_deallocate;
asio_handler_deallocate(mem, size,
p->get_legacy_handler_pointer());
}
template<
class Handler,
class Executor1,
class Allocator>
bool
asio_handler_is_continuation(
async_base<Handler, Executor1, Allocator>* p)
{
using net::asio_handler_is_continuation;
return asio_handler_is_continuation(
p->get_legacy_handler_pointer());
}
template<
class State,
class Handler,
class Executor1,
class Allocator,
class... Args>
State&
allocate_stable(
stable_async_base<
Handler, Executor1, Allocator>& base,
Args&&... args)
{
using allocator_type = typename stable_async_base<
Handler, Executor1, Allocator>::allocator_type;
using A = typename detail::allocator_traits<
allocator_type>::template rebind_alloc<
detail::allocate_stable_state<
State, allocator_type>>;
struct deleter
{
allocator_type alloc;
detail::allocate_stable_state<
State, allocator_type>* ptr;
~deleter()
{
if(ptr)
{
A a(alloc);
detail::allocator_traits<A>::deallocate(a, ptr, 1);
}
}
};
A a(base.get_allocator());
deleter d{base.get_allocator(), nullptr};
d.ptr = detail::allocator_traits<A>::allocate(a, 1);
detail::allocator_traits<A>::construct(a, d.ptr,
d.alloc, std::forward<Args>(args)...);
d.ptr->next_ = base.list_;
base.list_ = d.ptr;
return boost::exchange(d.ptr, nullptr)->value;
}
} // beast
} // boost
#endif

View File

@ -147,7 +147,7 @@ public:
@param alloc The allocator to use for the object. @param alloc The allocator to use for the object.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -163,7 +163,7 @@ public:
@param alloc The allocator to use for the object. @param alloc The allocator to use for the object.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -183,7 +183,7 @@ public:
moved-from object will have zero capacity, zero readable moved-from object will have zero capacity, zero readable
bytes, and zero writable bytes. bytes, and zero writable bytes.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -337,7 +337,7 @@ public:
@param n The maximum number of bytes ever allowed for capacity. @param n The maximum number of bytes ever allowed for capacity.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -363,7 +363,7 @@ public:
@throws std::length_error if n is larger than the maximum @throws std::length_error if n is larger than the maximum
allocation size of the allocator. allocation size of the allocator.
@par Exception Safety @esafe
Strong guarantee. Strong guarantee.
*/ */
@ -375,7 +375,7 @@ public:
Buffer sequences previously obtained using @ref data or Buffer sequences previously obtained using @ref data or
@ref prepare become invalid. @ref prepare become invalid.
@par Exception Safety @esafe
Strong guarantee. Strong guarantee.
*/ */
@ -388,7 +388,7 @@ public:
Buffer sequences previously obtained using @ref data or Buffer sequences previously obtained using @ref data or
@ref prepare become invalid. @ref prepare become invalid.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -477,7 +477,7 @@ public:
@throws std::length_error if `size() + n` exceeds `max_size()`. @throws std::length_error if `size() + n` exceeds `max_size()`.
@par Exception Safety @esafe
Strong guarantee. Strong guarantee.
*/ */
@ -499,7 +499,7 @@ public:
is greater than the number of writable bytes, all is greater than the number of writable bytes, all
writable bytes are appended. writable bytes are appended.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -517,7 +517,7 @@ public:
is greater than the number of readable bytes, all is greater than the number of readable bytes, all
readable bytes are removed. readable bytes are removed.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */

View File

@ -23,9 +23,9 @@
namespace boost { namespace boost {
namespace beast { namespace beast {
/** Return an output stream that formats values into a @b DynamicBuffer. /** Return an output stream that formats values into a <em>DynamicBuffer</em>.
This function wraps the caller provided @b DynamicBuffer into This function wraps the caller provided <em>DynamicBuffer</em> into
a `std::ostream` derived class, to allow `operator<<` stream style a `std::ostream` derived class, to allow `operator<<` stream style
formatting operations. formatting operations.
@ -37,7 +37,7 @@ namespace beast {
@note Calling members of the underlying buffer before the output @note Calling members of the underlying buffer before the output
stream is destroyed results in undefined behavior. stream is destroyed results in undefined behavior.
@param buffer An object meeting the requirements of @b DynamicBuffer @param buffer An object meeting the requirements of <em>DynamicBuffer</em>
into which the formatted output will be placed. into which the formatted output will be placed.
@return An object derived from `std::ostream` which redirects output @return An object derived from `std::ostream` which redirects output

View File

@ -17,7 +17,7 @@
namespace boost { namespace boost {
namespace beast { namespace beast {
/** Helper class to assist implementing a RatePolicy. /** Helper class to assist implementing a <em>RatePolicy</em>.
This class is used by the implementation to gain access to the This class is used by the implementation to gain access to the
private members of a user-defined object meeting the requirements private members of a user-defined object meeting the requirements
@ -36,7 +36,7 @@ namespace beast {
@li <em>RatePolicy</em> @li <em>RatePolicy</em>
@see @ref beast::basic_stream @see beast::basic_stream
*/ */
class rate_policy_access class rate_policy_access
{ {
@ -145,7 +145,7 @@ class unlimited_rate_policy
@li <em>RatePolicy</em> @li <em>RatePolicy</em>
@see @ref beast::basic_stream @see beast::basic_stream
*/ */
class simple_rate_policy class simple_rate_policy
{ {

View File

@ -32,7 +32,7 @@ namespace beast {
is provided to permit them to be efficiently used with is provided to permit them to be efficiently used with
I/O operations. I/O operations.
Objects of this type meet the requirements of @b DynamicBuffer Objects of this type meet the requirements of <em>DynamicBuffer</em>
and have the following additional properties: and have the following additional properties:
@li A mutable buffer sequence representing the readable @li A mutable buffer sequence representing the readable
@ -51,7 +51,7 @@ namespace beast {
@ref static_buffer; however, to reduce the number of template @ref static_buffer; however, to reduce the number of template
instantiations, objects should be passed `static_buffer_base&`. instantiations, objects should be passed `static_buffer_base&`.
@see @ref static_buffer @see static_buffer
*/ */
class static_buffer_base class static_buffer_base
{ {
@ -84,7 +84,7 @@ public:
Buffer sequences previously obtained using @ref data or Buffer sequences previously obtained using @ref data or
@ref prepare become invalid. @ref prepare become invalid.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -161,7 +161,7 @@ public:
@throws std::length_error if `size() + n` exceeds `max_size()`. @throws std::length_error if `size() + n` exceeds `max_size()`.
@par Exception Safety @esafe
Strong guarantee. Strong guarantee.
*/ */
@ -183,7 +183,7 @@ public:
is greater than the number of writable bytes, all is greater than the number of writable bytes, all
writable bytes are appended. writable bytes are appended.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -202,7 +202,7 @@ public:
is greater than the number of readable bytes, all is greater than the number of readable bytes, all
readable bytes are removed. readable bytes are removed.
@par Exception Safety @esafe
No-throw guarantee. No-throw guarantee.
*/ */
@ -223,7 +223,7 @@ public:
is provided to permit them to be efficiently used with is provided to permit them to be efficiently used with
I/O operations. I/O operations.
Objects of this type meet the requirements of @b DynamicBuffer Objects of this type meet the requirements of <em>DynamicBuffer</em>
and have the following additional properties: and have the following additional properties:
@li A mutable buffer sequence representing the readable @li A mutable buffer sequence representing the readable
@ -241,7 +241,7 @@ public:
objects of this type in a deduced context, the signature of the objects of this type in a deduced context, the signature of the
receiving function should use @ref static_buffer_base instead. receiving function should use @ref static_buffer_base instead.
@see @ref static_buffer_base @see static_buffer_base
*/ */
template<std::size_t N> template<std::size_t N>
class static_buffer : public static_buffer_base class static_buffer : public static_buffer_base

View File

@ -35,7 +35,7 @@ namespace beast {
@note The stored string is always null-terminated. @note The stored string is always null-terminated.
@see @ref to_static_string @see to_static_string
*/ */
template< template<
std::size_t N, std::size_t N,

View File

@ -79,7 +79,7 @@ using lowest_layer_type = detail::lowest_layer_type<T>;
@param t The layer in a stack of layered objects for which the lowest layer is returned. @param t The layer in a stack of layered objects for which the lowest layer is returned.
@see @ref close_socket, @ref lowest_layer_type @see close_socket, lowest_layer_type
*/ */
template<class T> template<class T>
lowest_layer_type<T>& lowest_layer_type<T>&
@ -163,7 +163,7 @@ using executor_type =
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class T> template<class T>
struct has_get_executor : std::integral_constant<bool, ...>{}; using has_get_executor = __see_below__;
#else #else
template<class T, class = void> template<class T, class = void>
struct has_get_executor : std::false_type {}; struct has_get_executor : std::false_type {};
@ -175,16 +175,14 @@ struct has_get_executor<T, boost::void_t<decltype(
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/** Determine if `T` meets the requirements of @b SyncReadStream. /** Determine if at type meets the requirements of <em>SyncReadStream</em>.
Metafunctions are used to perform compile time checking of template Metafunctions are used to perform compile time checking of template
types. This type will be `std::true_type` if `T` meets the requirements, types. This type will be `std::true_type` if `T` meets the requirements,
else the type will be `std::false_type`. else the type will be `std::false_type`.
@par Example @par Example
Use with `static_assert`: Use with `static_assert`:
@code @code
template<class SyncReadStream> template<class SyncReadStream>
void f(SyncReadStream& stream) void f(SyncReadStream& stream)
@ -195,7 +193,6 @@ struct has_get_executor<T, boost::void_t<decltype(
@endcode @endcode
Use with `std::enable_if` (SFINAE): Use with `std::enable_if` (SFINAE):
@code @code
template<class SyncReadStream> template<class SyncReadStream>
typename std::enable_if<is_sync_read_stream<SyncReadStream>::value>::type typename std::enable_if<is_sync_read_stream<SyncReadStream>::value>::type
@ -204,7 +201,7 @@ struct has_get_executor<T, boost::void_t<decltype(
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class T> template<class T>
struct is_sync_read_stream : std::integral_constant<bool, ...>{}; using is_sync_read_stream = __see_below__;
#else #else
template<class T, class = void> template<class T, class = void>
struct is_sync_read_stream : std::false_type {}; struct is_sync_read_stream : std::false_type {};
@ -219,7 +216,7 @@ struct is_sync_read_stream<T, boost::void_t<decltype(
)>> : std::true_type {}; )>> : std::true_type {};
#endif #endif
/** Determine if `T` meets the requirements of @b SyncWriteStream. /** Determine if `T` meets the requirements of <em>SyncWriteStream</em>.
Metafunctions are used to perform compile time checking of template Metafunctions are used to perform compile time checking of template
types. This type will be `std::true_type` if `T` meets the requirements, types. This type will be `std::true_type` if `T` meets the requirements,
@ -248,7 +245,7 @@ struct is_sync_read_stream<T, boost::void_t<decltype(
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class T> template<class T>
struct is_sync_write_stream : std::integral_constant<bool, ...>{}; using is_sync_write_stream = __see_below__;
#else #else
template<class T, class = void> template<class T, class = void>
struct is_sync_write_stream : std::false_type {}; struct is_sync_write_stream : std::false_type {};
@ -293,7 +290,7 @@ struct is_sync_write_stream<T, boost::void_t<decltype(
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class T> template<class T>
struct is_sync_stream : std::integral_constant<bool, ...>{}; using is_sync_stream = __see_below__;
#else #else
template<class T> template<class T>
using is_sync_stream = std::integral_constant<bool, using is_sync_stream = std::integral_constant<bool,
@ -302,7 +299,7 @@ using is_sync_stream = std::integral_constant<bool,
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/** Determine if `T` meets the requirements of @b AsyncReadStream. /** Determine if `T` meets the requirements of <em>AsyncReadStream</em>.
Metafunctions are used to perform compile time checking of template Metafunctions are used to perform compile time checking of template
types. This type will be `std::true_type` if `T` meets the requirements, types. This type will be `std::true_type` if `T` meets the requirements,
@ -331,7 +328,7 @@ using is_sync_stream = std::integral_constant<bool,
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class T> template<class T>
struct is_async_read_stream : std::integral_constant<bool, ...>{}; using is_async_read_stream = __see_below__;
#else #else
template<class T, class = void> template<class T, class = void>
struct is_async_read_stream : std::false_type {}; struct is_async_read_stream : std::false_type {};
@ -346,7 +343,7 @@ struct is_async_read_stream<T, boost::void_t<decltype(
> {}; > {};
#endif #endif
/** Determine if `T` meets the requirements of @b AsyncWriteStream. /** Determine if `T` meets the requirements of <em>AsyncWriteStream</em>.
Metafunctions are used to perform compile time checking of template Metafunctions are used to perform compile time checking of template
types. This type will be `std::true_type` if `T` meets the requirements, types. This type will be `std::true_type` if `T` meets the requirements,
@ -375,7 +372,7 @@ struct is_async_read_stream<T, boost::void_t<decltype(
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class T> template<class T>
struct is_async_write_stream : std::integral_constant<bool, ...>{}; using is_async_write_stream = __see_below__;
#else #else
template<class T, class = void> template<class T, class = void>
struct is_async_write_stream : std::false_type {}; struct is_async_write_stream : std::false_type {};
@ -419,7 +416,7 @@ struct is_async_write_stream<T, boost::void_t<decltype(
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class T> template<class T>
struct is_async_stream : std::integral_constant<bool, ...>{}; using is_async_stream = __see_below__;
#else #else
template<class T> template<class T>
using is_async_stream = std::integral_constant<bool, using is_async_stream = std::integral_constant<bool,

View File

@ -23,12 +23,14 @@ BOOST_PRAGMA_MESSAGE("<boost/beast/core/type_traits.hpp> is DEPRECATED and will
namespace boost { namespace boost {
namespace beast { namespace beast {
/** Determine if `T` meets the requirements of @b CompletionHandler. /** Determine if `T` meets the requirements of <em>CompletionHandler</em>.
This trait checks whether a type meets the requirements for a completion This trait checks whether a type meets the requirements for a completion
handler, and is also callable with the specified signature. handler, and is also callable with the specified signature.
Metafunctions are used to perform compile time checking of template Metafunctions are used to perform compile time checking of template
types. This type will be `std::true_type` if `T` meets the requirements, types. This type will be `std::true_type` if `T` meets the requirements,
else the type will be `std::false_type`. else the type will be `std::false_type`.
@par Example @par Example
Use with `static_assert`: Use with `static_assert`:
@code @code
@ -42,7 +44,7 @@ namespace beast {
*/ */
template<class T, class Signature> template<class T, class Signature>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using is_completion_handler = std::integral_constant<bool, ...>; using is_completion_handler = __see_below__
#else #else
using is_completion_handler = std::integral_constant<bool, using is_completion_handler = std::integral_constant<bool,
std::is_move_constructible<typename std::decay<T>::type>::value && std::is_move_constructible<typename std::decay<T>::type>::value &&

View File

@ -24,9 +24,9 @@ namespace boost {
namespace beast { namespace beast {
namespace http { namespace http {
/** A @b Body using a @b DynamicBuffer /** A <em>Body</em> using a <em>DynamicBuffer</em>
This body uses a @b DynamicBuffer as a memory-based container This body uses a <em>DynamicBuffer</em> as a memory-based container
for holding message payloads. Messages using this body type for holding message payloads. Messages using this body type
may be serialized and parsed. may be serialized and parsed.
*/ */
@ -59,7 +59,7 @@ struct basic_dynamic_body
/** The algorithm for parsing the body /** The algorithm for parsing the body
Meets the requirements of @b BodyReader. Meets the requirements of <em>BodyReader</em>.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using reader = __implementation_defined__; using reader = __implementation_defined__;
@ -117,7 +117,7 @@ struct basic_dynamic_body
/** The algorithm for serializing the body /** The algorithm for serializing the body
Meets the requirements of @b BodyWriter. Meets the requirements of <em>BodyWriter</em>.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using writer = __implementation_defined__; using writer = __implementation_defined__;

View File

@ -38,7 +38,7 @@ namespace http {
content from a directory as part of a web service. content from a directory as part of a web service.
@tparam File The implementation to use for accessing files. @tparam File The implementation to use for accessing files.
This type must meet the requirements of @b File. This type must meet the requirements of <em>File</em>.
*/ */
template<class File> template<class File>
struct basic_file_body struct basic_file_body

View File

@ -377,7 +377,7 @@ public:
the parser may not be restarted. the parser may not be restarted.
@param buffers An object meeting the requirements of @param buffers An object meeting the requirements of
@b ConstBufferSequence that represents the next chunk of <em>ConstBufferSequence</em> that represents the next chunk of
message data. If the length of this buffer sequence is message data. If the length of this buffer sequence is
one, the implementation will not allocate additional memory. one, the implementation will not allocate additional memory.
The class @ref beast::basic_flat_buffer is provided as one way to The class @ref beast::basic_flat_buffer is provided as one way to

View File

@ -23,7 +23,7 @@ namespace boost {
namespace beast { namespace beast {
namespace http { namespace http {
/** A @b Body using a caller provided buffer /** A <em>Body</em> using a caller provided buffer
Messages using this body type may be serialized and parsed. Messages using this body type may be serialized and parsed.
To use this class, the caller must initialize the members To use this class, the caller must initialize the members
@ -94,7 +94,7 @@ struct buffer_body
/** The algorithm for parsing the body /** The algorithm for parsing the body
Meets the requirements of @b BodyReader. Meets the requirements of <em>BodyReader</em>.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using reader = __implementation_defined__; using reader = __implementation_defined__;
@ -150,7 +150,7 @@ struct buffer_body
/** The algorithm for serializing the body /** The algorithm for serializing the body
Meets the requirements of @b BodyWriter. Meets the requirements of <em>BodyWriter</em>.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using writer = __implementation_defined__; using writer = __implementation_defined__;

View File

@ -25,7 +25,7 @@ namespace http {
/** A chunked encoding crlf /** A chunked encoding crlf
This implements a @b ConstBufferSequence holding the CRLF This implements a <em>ConstBufferSequence</em> holding the CRLF
(`"\r\n"`) used as a delimiter in a @em chunk. (`"\r\n"`) used as a delimiter in a @em chunk.
To use this class, pass an instance of it to a To use this class, pass an instance of it to a
@ -44,20 +44,20 @@ struct chunk_crlf
//----- //-----
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using value_type = __implementation_defined__; using value_type = __implementation_defined__;
#else #else
using value_type = net::const_buffer; using value_type = net::const_buffer;
#endif #endif
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
using const_iterator = value_type const*; using const_iterator = value_type const*;
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
chunk_crlf(chunk_crlf const&) = default; chunk_crlf(chunk_crlf const&) = default;
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
const_iterator const_iterator
begin() const begin() const
{ {
@ -65,7 +65,7 @@ struct chunk_crlf
return &cb; return &cb;
} }
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
const_iterator const_iterator
end() const end() const
{ {
@ -77,7 +77,7 @@ struct chunk_crlf
/** A @em chunk header /** A @em chunk header
This implements a @b ConstBufferSequence representing the This implements a <em>ConstBufferSequence</em> representing the
header of a @em chunk. The serialized format is as follows: header of a @em chunk. The serialized format is as follows:
@code @code
chunk-header = 1*HEXDIG chunk-ext CRLF chunk-header = 1*HEXDIG chunk-ext CRLF
@ -228,31 +228,31 @@ public:
//----- //-----
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using value_type = __implementation_defined__; using value_type = __implementation_defined__;
#else #else
using value_type = typename view_type::value_type; using value_type = typename view_type::value_type;
#endif #endif
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using const_iterator = __implementation_defined__; using const_iterator = __implementation_defined__;
#else #else
using const_iterator = typename view_type::const_iterator; using const_iterator = typename view_type::const_iterator;
#endif #endif
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
chunk_header(chunk_header const&) = default; chunk_header(chunk_header const&) = default;
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
const_iterator const_iterator
begin() const begin() const
{ {
return view_.begin(); return view_.begin();
} }
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
const_iterator const_iterator
end() const end() const
{ {
@ -264,7 +264,7 @@ public:
/** A @em chunk /** A @em chunk
This implements a @b ConstBufferSequence representing This implements a <em>ConstBufferSequence</em> representing
a @em chunk. The serialized format is as follows: a @em chunk. The serialized format is as follows:
@code @code
chunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF chunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF
@ -422,28 +422,28 @@ public:
//----- //-----
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using value_type = __implementation_defined__; using value_type = __implementation_defined__;
#else #else
using value_type = typename view_type::value_type; using value_type = typename view_type::value_type;
#endif #endif
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using const_iterator = __implementation_defined__; using const_iterator = __implementation_defined__;
#else #else
using const_iterator = typename view_type::const_iterator; using const_iterator = typename view_type::const_iterator;
#endif #endif
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
const_iterator const_iterator
begin() const begin() const
{ {
return view_.begin(); return view_.begin();
} }
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
const_iterator const_iterator
end() const end() const
{ {
@ -524,10 +524,10 @@ public:
//----- //-----
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
chunk_last(chunk_last const&) = default; chunk_last(chunk_last const&) = default;
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using value_type = __implementation_defined__; using value_type = __implementation_defined__;
#else #else
@ -535,7 +535,7 @@ public:
typename view_type::value_type; typename view_type::value_type;
#endif #endif
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using const_iterator = __implementation_defined__; using const_iterator = __implementation_defined__;
#else #else
@ -543,14 +543,14 @@ public:
typename view_type::const_iterator; typename view_type::const_iterator;
#endif #endif
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
const_iterator const_iterator
begin() const begin() const
{ {
return view_.begin(); return view_.begin();
} }
/// Required for @b ConstBufferSequence /// Required for <em>ConstBufferSequence</em>
const_iterator const_iterator
end() const end() const
{ {

View File

@ -80,7 +80,7 @@ struct has_value_type<T, beast::detail::void_t<
typename T::value_type typename T::value_type
> > : std::true_type {}; > > : std::true_type {};
/** Determine if a @b Body type has a size /** Determine if a <em>Body</em> type has a size
This metafunction is equivalent to `std::true_type` if This metafunction is equivalent to `std::true_type` if
Body contains a static member function called `size`. Body contains a static member function called `size`.

View File

@ -19,7 +19,7 @@ namespace http {
/** A dynamic message body represented by a @ref multi_buffer /** A dynamic message body represented by a @ref multi_buffer
Meets the requirements of @b Body. Meets the requirements of <em>Body</em>.
*/ */
using dynamic_body = basic_dynamic_body<multi_buffer>; using dynamic_body = basic_dynamic_body<multi_buffer>;

View File

@ -19,7 +19,7 @@ namespace boost {
namespace beast { namespace beast {
namespace http { namespace http {
/** An empty @b Body /** An empty <em>Body</em>
This body is used to represent messages which do not have a This body is used to represent messages which do not have a
message body. If this body is used with a parser, and the message body. If this body is used with a parser, and the
@ -54,7 +54,7 @@ struct empty_body
/** The algorithm for parsing the body /** The algorithm for parsing the body
Meets the requirements of @b BodyReader. Meets the requirements of <em>BodyReader</em>.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using reader = __implementation_defined__; using reader = __implementation_defined__;
@ -92,7 +92,7 @@ struct empty_body
/** The algorithm for serializing the body /** The algorithm for serializing the body
Meets the requirements of @b BodyWriter. Meets the requirements of <em>BodyWriter</em>.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using writer = __implementation_defined__; using writer = __implementation_defined__;

View File

@ -51,7 +51,7 @@ enum class error
octets into a message container which has the octets into a message container which has the
@ref empty_body body type. @ref empty_body body type.
@see @ref empty_body @see empty_body
*/ */
unexpected_body, unexpected_body,

View File

@ -45,10 +45,9 @@ namespace http {
is iterated the fields are presented in the order of insertion, with is iterated the fields are presented in the order of insertion, with
fields having the same name following each other consecutively. fields having the same name following each other consecutively.
Meets the requirements of @b Fields Meets the requirements of <em>Fields</em>
@tparam Allocator The allocator to use. This must meet the @tparam Allocator The allocator to use.
requirements of @b Allocator.
*/ */
template<class Allocator> template<class Allocator>
class basic_fields class basic_fields

View File

@ -129,7 +129,7 @@ public:
@note This function is only available when `isRequest == true`. @note This function is only available when `isRequest == true`.
@see @ref method_string @see method_string
*/ */
verb verb
method() const; method() const;
@ -152,7 +152,7 @@ public:
@note This function is only available when `isRequest == true`. @note This function is only available when `isRequest == true`.
@see @ref method @see method
*/ */
string_view string_view
method_string() const; method_string() const;
@ -824,7 +824,7 @@ public:
/** Returns the payload size of the body in octets if possible. /** Returns the payload size of the body in octets if possible.
This function invokes the @b Body algorithm to measure This function invokes the <em>Body</em> algorithm to measure
the number of octets in the serialized body container. If the number of octets in the serialized body container. If
there is no body, this will return zero. Otherwise, if the there is no body, this will return zero. Otherwise, if the
body exists but is not known ahead of time, `boost::none` body exists but is not known ahead of time, `boost::none`

View File

@ -35,7 +35,7 @@ namespace http {
will be parsed. will be parsed.
@tparam Body The type used to represent the body. This must @tparam Body The type used to represent the body. This must
meet the requirements of @b Body. meet the requirements of <em>Body</em>.
@tparam Allocator The type of allocator used with the @tparam Allocator The type of allocator used with the
@ref basic_fields container. @ref basic_fields container.
@ -120,7 +120,7 @@ public:
This constructs a new parser by move constructing the This constructs a new parser by move constructing the
header from another parser with a different body type. The header from another parser with a different body type. The
constructed-from parser must not have any parsed body octets or constructed-from parser must not have any parsed body octets or
initialized @b BodyReader, otherwise an exception is generated. initialized <em>BodyReader</em>, otherwise an exception is generated.
@par Example @par Example
@code @code

View File

@ -185,14 +185,12 @@ read_some(
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error, // result of operation error_code const& error, // result of operation
std::size_t bytes_transferred // the total number of bytes transferred from the stream std::size_t bytes_transferred // the total number of bytes transferred from the stream
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -378,14 +376,12 @@ read_header(
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error, // result of operation error_code const& error, // result of operation
std::size_t bytes_transferred // the total number of bytes transferred from the stream std::size_t bytes_transferred // the total number of bytes transferred from the stream
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -573,14 +569,12 @@ read(
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error, // result of operation error_code const& error, // result of operation
std::size_t bytes_transferred // the total number of bytes transferred from the stream std::size_t bytes_transferred // the total number of bytes transferred from the stream
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -777,14 +771,12 @@ read(
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error, // result of operation error_code const& error, // result of operation
std::size_t bytes_transferred // the total number of bytes transferred from the stream std::size_t bytes_transferred // the total number of bytes transferred from the stream
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a

View File

@ -65,7 +65,7 @@ public:
/** The type of message this serializer uses /** The type of message this serializer uses
This may be const or non-const depending on the This may be const or non-const depending on the
implementation of the corresponding @b BodyWriter. implementation of the corresponding <em>BodyWriter</em>.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using value_type = __implementation_defined__; using value_type = __implementation_defined__;
@ -294,7 +294,7 @@ public:
/** Returns the next set of buffers in the serialization. /** Returns the next set of buffers in the serialization.
This function will attempt to call the `visit` function This function will attempt to call the `visit` function
object with a @b ConstBufferSequence of unspecified type object with a <em>ConstBufferSequence</em> of unspecified type
representing the next set of buffers in the serialization representing the next set of buffers in the serialization
of the message represented by this object. of the message represented by this object.
@ -336,7 +336,7 @@ public:
void void
consume(std::size_t n); consume(std::size_t n);
/** Provides low-level access to the associated @b BodyWriter /** Provides low-level access to the associated <em>BodyWriter</em>
This function provides access to the instance of the writer This function provides access to the instance of the writer
associated with the body and created by the serializer associated with the body and created by the serializer

View File

@ -21,7 +21,7 @@ namespace boost {
namespace beast { namespace beast {
namespace http { namespace http {
/** A @b Body using @ref span /** A <em>Body</em> using @ref span
This body uses @ref span as a memory-based container for This body uses @ref span as a memory-based container for
holding message payloads. The container represents a holding message payloads. The container represents a
@ -62,7 +62,7 @@ public:
/** The algorithm for parsing the body /** The algorithm for parsing the body
Meets the requirements of @b BodyReader. Meets the requirements of <em>BodyReader</em>.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using reader = __implementation_defined__; using reader = __implementation_defined__;
@ -121,7 +121,7 @@ public:
/** The algorithm for serializing the body /** The algorithm for serializing the body
Meets the requirements of @b BodyWriter. Meets the requirements of <em>BodyWriter</em>.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using writer = __implementation_defined__; using writer = __implementation_defined__;

View File

@ -30,7 +30,7 @@ namespace boost {
namespace beast { namespace beast {
namespace http { namespace http {
/** A @b Body using `std::basic_string` /** A <em>Body</em> using `std::basic_string`
This body uses `std::basic_string` as a memory-based container This body uses `std::basic_string` as a memory-based container
for holding message payloads. Messages using this body type for holding message payloads. Messages using this body type
@ -72,7 +72,7 @@ public:
/** The algorithm for parsing the body /** The algorithm for parsing the body
Meets the requirements of @b BodyReader. Meets the requirements of <em>BodyReader</em>.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using reader = __implementation_defined__; using reader = __implementation_defined__;
@ -140,7 +140,7 @@ public:
/** The algorithm for serializing the body /** The algorithm for serializing the body
Meets the requirements of @b BodyWriter. Meets the requirements of <em>BodyWriter</em>.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using writer = __implementation_defined__; using writer = __implementation_defined__;
@ -177,7 +177,7 @@ public:
#endif #endif
}; };
/// A @b Body using `std::string` /// A <em>Body</em> using `std::string`
using string_body = basic_string_body<char>; using string_body = basic_string_body<char>;
} // http } // http

View File

@ -26,12 +26,12 @@ namespace http {
template<bool, class, class> template<bool, class, class>
class message; class message;
/** Determine if `T` meets the requirements of @b Body. /** Determine if a type meets the <em>Body</em> named requirements.
This metafunction is equivalent to `std::true_type` This alias template is `std::true_type` if `T` meets
if `T` has a nested type named `value_type`. the requirements, otherwise it is `std::false_type`.
@tparam T The body type to test. @tparam T The type to test.
@par Example @par Example
@code @code
@ -45,18 +45,18 @@ class message;
*/ */
template<class T> template<class T>
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
struct is_body : std::integral_constant<bool, ...>{}; using is_body = __see_below__;
#else #else
using is_body = detail::has_value_type<T>; using is_body = detail::has_value_type<T>;
#endif #endif
/** Determine if a @b Body type has a reader. /** Determine if a type has a nested <em>BodyWriter</em>.
This metafunction is equivalent to `std::true_type` if: This alias template is `std::true_type` when:
@li `T` has a nested type named `reader` @li `T` has a nested type named `writer`
@li The nested type meets the requirements of @b BodyWriter. @li `writer` meets the requirements of <em>BodyWriter</em>.
@tparam T The body type to test. @tparam T The body type to test.
@ -72,7 +72,7 @@ using is_body = detail::has_value_type<T>;
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class T> template<class T>
struct is_body_writer : std::integral_constant<bool, ...> {}; using is_body_writer = __see_below__;
#else #else
template<class T, class = void> template<class T, class = void>
struct is_body_writer : std::false_type {}; struct is_body_writer : std::false_type {};
@ -99,11 +99,19 @@ struct is_body_writer<T, beast::detail::void_t<
> {}; > {};
#endif #endif
/** Returns true if the writer for a @b Body mutates the body container. /** Determine if a type has a nested <em>BodyWriter</em>.
This alias template is `std::true_type` when:
@li `T` has a nested type named `writer`
@li `writer` meets the requirements of <em>BodyWriter</em>.
@tparam T The body type to test.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class T> template<class T>
struct is_mutable_body_writer : std::integral_constant<bool, ...> {}; using is_mutable_body_writer = __see_below__;
#else #else
template<class T, class = void> template<class T, class = void>
struct is_mutable_body_writer : std::false_type {}; struct is_mutable_body_writer : std::false_type {};
@ -136,13 +144,13 @@ struct is_mutable_body_writer<T, beast::detail::void_t<
>{}; >{};
#endif #endif
/** Determine if a @b Body type has a reader. /** Determine if a type has a nested <em>BodyReader</em>.
This metafunction is equivalent to `std::true_type` if: This alias template is `std::true_type` when:
@li `T` has a nested type named `reader` @li `T` has a nested type named `reader`
@li The nested type meets the requirements of @b BodyReader. @li `reader` meets the requirements of <em>BodyReader</em>.
@tparam T The body type to test. @tparam T The body type to test.
@ -158,7 +166,7 @@ struct is_mutable_body_writer<T, beast::detail::void_t<
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class T> template<class T>
struct is_body_reader : std::integral_constant<bool, ...> {}; using is_body_reader = __see_below__;
#else #else
template<class T, class = void> template<class T, class = void>
struct is_body_reader : std::false_type {}; struct is_body_reader : std::false_type {};
@ -186,14 +194,15 @@ struct is_body_reader<T, beast::detail::void_t<decltype(
}; };
#endif #endif
/** Determine if `T` meets the requirements of @b Fields /** Determine if a type meets the <em>Fields</em> named requirements.
@tparam T The body type to test. This alias template is `std::true_type` if `T` meets
the requirements, otherwise it is `std::false_type`.
@tparam T The type to test.
@par Example @par Example
Use with `static_assert`: Use with `static_assert`:
@code @code
template<bool isRequest, class Body, class Fields> template<bool isRequest, class Body, class Fields>
void f(message<isRequest, Body, Fields> const&) void f(message<isRequest, Body, Fields> const&)
@ -204,7 +213,6 @@ struct is_body_reader<T, beast::detail::void_t<decltype(
@endcode @endcode
Use with `std::enable_if` (SFINAE): Use with `std::enable_if` (SFINAE):
@code @code
template<bool isRequest, class Body, class Fields> template<bool isRequest, class Body, class Fields>
typename std::enable_if<is_fields<Fields>::value>::type typename std::enable_if<is_fields<Fields>::value>::type
@ -213,7 +221,7 @@ struct is_body_reader<T, beast::detail::void_t<decltype(
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
template<class T> template<class T>
struct is_fields : std::integral_constant<bool, ...> {}; using is_fields = __see_below__;
#else #else
template<class T> template<class T>
using is_fields = typename detail::is_fields_helper<T>::type; using is_fields = typename detail::is_fields_helper<T>::type;

View File

@ -29,7 +29,7 @@ namespace boost {
namespace beast { namespace beast {
namespace http { namespace http {
/** A @b Body using `std::vector` /** A <em>Body</em> using `std::vector`
This body uses `std::vector` as a memory-based container This body uses `std::vector` as a memory-based container
for holding message payloads. Messages using this body type for holding message payloads. Messages using this body type
@ -66,7 +66,7 @@ public:
/** The algorithm for parsing the body /** The algorithm for parsing the body
Meets the requirements of @b BodyReader. Meets the requirements of <em>BodyReader</em>.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using reader = __implementation_defined__; using reader = __implementation_defined__;
@ -128,7 +128,7 @@ public:
/** The algorithm for serializing the body /** The algorithm for serializing the body
Meets the requirements of @b BodyWriter. Meets the requirements of <em>BodyWriter</em>.
*/ */
#if BOOST_BEAST_DOXYGEN #if BOOST_BEAST_DOXYGEN
using writer = __implementation_defined__; using writer = __implementation_defined__;

View File

@ -55,7 +55,7 @@ namespace http {
stream. stream.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b SyncWriteStream concept. The type must support the <em>SyncWriteStream</em> concept.
@param sr The serializer to use. @param sr The serializer to use.
@ -97,7 +97,7 @@ write_some(
stream. stream.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b SyncWriteStream concept. The type must support the <em>SyncWriteStream</em> concept.
@param sr The serializer to use. @param sr The serializer to use.
@ -105,7 +105,7 @@ write_some(
@return The number of bytes written to the stream. @return The number of bytes written to the stream.
@see @ref async_write_some, @ref serializer @see async_write_some, serializer
*/ */
template< template<
class SyncWriteStream, class SyncWriteStream,
@ -143,7 +143,7 @@ write_some(
stream. stream.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b AsyncWriteStream concept. The type must support the <em>AsyncWriteStream</em> concept.
@param sr The serializer to use. @param sr The serializer to use.
The object must remain valid at least until the The object must remain valid at least until the
@ -153,20 +153,18 @@ write_some(
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error, // result of operation error_code const& error, // result of operation
std::size_t bytes_transferred // the number of bytes written to the stream std::size_t bytes_transferred // the number of bytes written to the stream
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
manner equivalent to using `net::post`. manner equivalent to using `net::post`.
@see @ref serializer @see serializer
*/ */
template< template<
class AsyncWriteStream, class AsyncWriteStream,
@ -194,7 +192,7 @@ async_write_some(
to the stream's `write_some` function. to the stream's `write_some` function.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b SyncWriteStream concept. The type must support the <em>SyncWriteStream</em> concept.
@param sr The serializer to use. @param sr The serializer to use.
@ -205,7 +203,7 @@ async_write_some(
@note The implementation will call @ref serializer::split with @note The implementation will call @ref serializer::split with
the value `true` on the serializer passed in. the value `true` on the serializer passed in.
@see @ref serializer @see serializer
*/ */
template< template<
class SyncWriteStream, class SyncWriteStream,
@ -229,7 +227,7 @@ write_header(
to the stream's `write_some` function. to the stream's `write_some` function.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b SyncWriteStream concept. The type must support the <em>SyncWriteStream</em> concept.
@param sr The serializer to use. @param sr The serializer to use.
@ -240,7 +238,7 @@ write_header(
@note The implementation will call @ref serializer::split with @note The implementation will call @ref serializer::split with
the value `true` on the serializer passed in. the value `true` on the serializer passed in.
@see @ref serializer @see serializer
*/ */
template< template<
class SyncWriteStream, class SyncWriteStream,
@ -268,7 +266,7 @@ write_header(
until this operation completes. until this operation completes.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b AsyncWriteStream concept. The type must support the <em>AsyncWriteStream</em> concept.
@param sr The serializer to use. @param sr The serializer to use.
The object must remain valid at least until the The object must remain valid at least until the
@ -278,14 +276,12 @@ write_header(
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error, // result of operation error_code const& error, // result of operation
std::size_t bytes_transferred // the number of bytes written to the stream std::size_t bytes_transferred // the number of bytes written to the stream
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -294,7 +290,7 @@ write_header(
@note The implementation will call @ref serializer::split with @note The implementation will call @ref serializer::split with
the value `true` on the serializer passed in. the value `true` on the serializer passed in.
@see @ref serializer @see serializer
*/ */
template< template<
class AsyncWriteStream, class AsyncWriteStream,
@ -322,7 +318,7 @@ async_write_header(
to the stream's `write_some` function. to the stream's `write_some` function.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b SyncWriteStream concept. The type must support the <em>SyncWriteStream</em> concept.
@param sr The serializer to use. @param sr The serializer to use.
@ -330,7 +326,7 @@ async_write_header(
@throws system_error Thrown on failure. @throws system_error Thrown on failure.
@see @ref serializer @see serializer
*/ */
template< template<
class SyncWriteStream, class SyncWriteStream,
@ -354,7 +350,7 @@ write(
to the stream's `write_some` function. to the stream's `write_some` function.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b SyncWriteStream concept. The type must support the <em>SyncWriteStream</em> concept.
@param sr The serializer to use. @param sr The serializer to use.
@ -362,7 +358,7 @@ write(
@return The number of bytes written to the stream. @return The number of bytes written to the stream.
@see @ref serializer @see serializer
*/ */
template< template<
class SyncWriteStream, class SyncWriteStream,
@ -390,7 +386,7 @@ write(
until this operation completes. until this operation completes.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b AsyncWriteStream concept. The type must support the <em>AsyncWriteStream</em> concept.
@param sr The serializer to use. @param sr The serializer to use.
The object must remain valid at least until the The object must remain valid at least until the
@ -400,20 +396,18 @@ write(
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error, // result of operation error_code const& error, // result of operation
std::size_t bytes_transferred // the number of bytes written to the stream std::size_t bytes_transferred // the number of bytes written to the stream
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
manner equivalent to using `net::post`. manner equivalent to using `net::post`.
@see @ref serializer @see serializer
*/ */
template< template<
class AsyncWriteStream, class AsyncWriteStream,
@ -441,10 +435,10 @@ async_write(
with an empty chunk decorator to produce buffers. with an empty chunk decorator to produce buffers.
@note This function only participates in overload resolution @note This function only participates in overload resolution
if @ref is_mutable_body_writer for @b Body returns `true`. if @ref is_mutable_body_writer for <em>Body</em> returns `true`.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b SyncWriteStream concept. The type must support the <em>SyncWriteStream</em> concept.
@param msg The message to write. @param msg The message to write.
@ -452,7 +446,7 @@ async_write(
@throws system_error Thrown on failure. @throws system_error Thrown on failure.
@see @ref message @see message
*/ */
template< template<
class SyncWriteStream, class SyncWriteStream,
@ -482,10 +476,10 @@ write(
with an empty chunk decorator to produce buffers. with an empty chunk decorator to produce buffers.
@note This function only participates in overload resolution @note This function only participates in overload resolution
if @ref is_mutable_body_writer for @b Body returns `false`. if @ref is_mutable_body_writer for <em>Body</em> returns `false`.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b SyncWriteStream concept. The type must support the <em>SyncWriteStream</em> concept.
@param msg The message to write. @param msg The message to write.
@ -493,7 +487,7 @@ write(
@throws system_error Thrown on failure. @throws system_error Thrown on failure.
@see @ref message @see message
*/ */
template< template<
class SyncWriteStream, class SyncWriteStream,
@ -523,10 +517,10 @@ write(
with an empty chunk decorator to produce buffers. with an empty chunk decorator to produce buffers.
@note This function only participates in overload resolution @note This function only participates in overload resolution
if @ref is_mutable_body_writer for @b Body returns `true`. if @ref is_mutable_body_writer for <em>Body</em> returns `true`.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b SyncWriteStream concept. The type must support the <em>SyncWriteStream</em> concept.
@param msg The message to write. @param msg The message to write.
@ -534,7 +528,7 @@ write(
@return The number of bytes written to the stream. @return The number of bytes written to the stream.
@see @ref message @see message
*/ */
template< template<
class SyncWriteStream, class SyncWriteStream,
@ -565,10 +559,10 @@ write(
with an empty chunk decorator to produce buffers. with an empty chunk decorator to produce buffers.
@note This function only participates in overload resolution @note This function only participates in overload resolution
if @ref is_mutable_body_writer for @b Body returns `false`. if @ref is_mutable_body_writer for <em>Body</em> returns `false`.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b SyncWriteStream concept. The type must support the <em>SyncWriteStream</em> concept.
@param msg The message to write. @param msg The message to write.
@ -576,7 +570,7 @@ write(
@return The number of bytes written to the stream. @return The number of bytes written to the stream.
@see @ref message @see message
*/ */
template< template<
class SyncWriteStream, class SyncWriteStream,
@ -610,10 +604,10 @@ write(
@ref serializer with an empty chunk decorator to produce buffers. @ref serializer with an empty chunk decorator to produce buffers.
@note This function only participates in overload resolution @note This function only participates in overload resolution
if @ref is_mutable_body_writer for @b Body returns `true`. if @ref is_mutable_body_writer for <em>Body</em> returns `true`.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b AsyncWriteStream concept. The type must support the <em>AsyncWriteStream</em> concept.
@param msg The message to write. @param msg The message to write.
The object must remain valid at least until the The object must remain valid at least until the
@ -623,20 +617,18 @@ write(
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error, // result of operation error_code const& error, // result of operation
std::size_t bytes_transferred // the number of bytes written to the stream std::size_t bytes_transferred // the number of bytes written to the stream
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
manner equivalent to using `net::post`. manner equivalent to using `net::post`.
@see @ref message @see message
*/ */
template< template<
class AsyncWriteStream, class AsyncWriteStream,
@ -671,10 +663,10 @@ async_write(
@ref serializer with an empty chunk decorator to produce buffers. @ref serializer with an empty chunk decorator to produce buffers.
@note This function only participates in overload resolution @note This function only participates in overload resolution
if @ref is_mutable_body_writer for @b Body returns `false`. if @ref is_mutable_body_writer for <em>Body</em> returns `false`.
@param stream The stream to which the data is to be written. @param stream The stream to which the data is to be written.
The type must support the @b AsyncWriteStream concept. The type must support the <em>AsyncWriteStream</em> concept.
@param msg The message to write. @param msg The message to write.
The object must remain valid at least until the The object must remain valid at least until the
@ -684,20 +676,18 @@ async_write(
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error, // result of operation error_code const& error, // result of operation
std::size_t bytes_transferred // the number of bytes written to the stream std::size_t bytes_transferred // the number of bytes written to the stream
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
manner equivalent to using `net::post`. manner equivalent to using `net::post`.
@see @ref message @see message
*/ */
template< template<
class AsyncWriteStream, class AsyncWriteStream,

View File

@ -401,8 +401,7 @@ public:
); @endcode ); @endcode
*/ */
template<class HandshakeHandler> template<class HandshakeHandler>
BOOST_ASIO_INITFN_RESULT_TYPE(HandshakeHandler, BOOST_ASIO_INITFN_RESULT_TYPE(HandshakeHandler, void(boost::system::error_code))
void(boost::system::error_code))
async_handshake(handshake_type type, async_handshake(handshake_type type,
BOOST_ASIO_MOVE_ARG(HandshakeHandler) handler) BOOST_ASIO_MOVE_ARG(HandshakeHandler) handler)
{ {
@ -432,8 +431,7 @@ public:
); @endcode ); @endcode
*/ */
template<class ConstBufferSequence, class BufferedHandshakeHandler> template<class ConstBufferSequence, class BufferedHandshakeHandler>
BOOST_ASIO_INITFN_RESULT_TYPE(BufferedHandshakeHandler, BOOST_ASIO_INITFN_RESULT_TYPE(BufferedHandshakeHandler, void(boost::system::error_code, std::size_t))
void(boost::system::error_code, std::size_t))
async_handshake(handshake_type type, ConstBufferSequence const& buffers, async_handshake(handshake_type type, ConstBufferSequence const& buffers,
BOOST_ASIO_MOVE_ARG(BufferedHandshakeHandler) handler) BOOST_ASIO_MOVE_ARG(BufferedHandshakeHandler) handler)
{ {
@ -480,8 +478,7 @@ public:
); @endcode ); @endcode
*/ */
template<class ShutdownHandler> template<class ShutdownHandler>
BOOST_ASIO_INITFN_RESULT_TYPE(ShutdownHandler, BOOST_ASIO_INITFN_RESULT_TYPE(ShutdownHandler, void(boost::system::error_code))
void(boost::system::error_code))
async_shutdown(BOOST_ASIO_MOVE_ARG(ShutdownHandler) handler) async_shutdown(BOOST_ASIO_MOVE_ARG(ShutdownHandler) handler)
{ {
return p_->next_layer().async_shutdown( return p_->next_layer().async_shutdown(
@ -559,8 +556,7 @@ public:
completes. completes.
*/ */
template<class ConstBufferSequence, class WriteHandler> template<class ConstBufferSequence, class WriteHandler>
BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, void(boost::system::error_code, std::size_t))
void(boost::system::error_code, std::size_t))
async_write_some(ConstBufferSequence const& buffers, async_write_some(ConstBufferSequence const& buffers,
BOOST_ASIO_MOVE_ARG(WriteHandler) handler) BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{ {
@ -641,8 +637,7 @@ public:
the asynchronous operation completes. the asynchronous operation completes.
*/ */
template<class MutableBufferSequence, class ReadHandler> template<class MutableBufferSequence, class ReadHandler>
BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, void(boost::system::error_code, std::size_t))
void(boost::system::error_code, std::size_t))
async_read_some(MutableBufferSequence const& buffers, async_read_some(MutableBufferSequence const& buffers,
BOOST_ASIO_MOVE_ARG(ReadHandler) handler) BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{ {

View File

@ -58,13 +58,11 @@ teardown(
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error // result of operation error_code const& error // result of operation
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a

View File

@ -91,9 +91,9 @@ class frame_test;
@tparam NextLayer The type representing the next layer, to which @tparam NextLayer The type representing the next layer, to which
data will be read and written during operations. For synchronous data will be read and written during operations. For synchronous
operations, the type must support the @b SyncStream concept. operations, the type must support the <em>SyncStream</em> concept.
For asynchronous operations, the type must support the For asynchronous operations, the type must support the
@b AsyncStream concept. <em>AsyncStream</em> concept.
@tparam deflateSupported A `bool` indicating whether or not the @tparam deflateSupported A `bool` indicating whether or not the
stream will be capable of negotiating the permessage-deflate websocket stream will be capable of negotiating the permessage-deflate websocket
@ -105,9 +105,9 @@ class frame_test;
are pending asynchronous operations associated with it. are pending asynchronous operations associated with it.
@par Concepts @par Concepts
@b AsyncStream, @li <em>AsyncStream</em>
@b DynamicBuffer, @li <em>DynamicBuffer</em>
@b SyncStream @li <em>SyncStream</em>
@see @see
@li <a href="https://tools.ietf.org/html/rfc6455#section-4.1">Websocket Opening Handshake Client Requirements (RFC6455)</a> @li <a href="https://tools.ietf.org/html/rfc6455#section-4.1">Websocket Opening Handshake Client Requirements (RFC6455)</a>
@ -848,13 +848,11 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec // Result of operation error_code const& ec // Result of operation
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -927,13 +925,11 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec // Result of operation error_code const& ec // Result of operation
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -1265,13 +1261,11 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec // Result of operation error_code const& ec // Result of operation
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -1328,13 +1322,11 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec // Result of operation error_code const& ec // Result of operation
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -1391,13 +1383,11 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec // Result of operation error_code const& ec // Result of operation
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -1525,13 +1515,11 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec // Result of operation error_code const& ec // Result of operation
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -1625,13 +1613,11 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec // Result of operation error_code const& ec // Result of operation
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -1728,13 +1714,11 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec // Result of operation error_code const& ec // Result of operation
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -1883,14 +1867,12 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec, // Result of operation error_code const& ec, // Result of operation
std::size_t bytes_written // Number of bytes appended to buffer std::size_t bytes_written // Number of bytes appended to buffer
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -2058,14 +2040,12 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec, // Result of operation error_code const& ec, // Result of operation
std::size_t bytes_written // Number of bytes appended to buffer std::size_t bytes_written // Number of bytes appended to buffer
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -2229,14 +2209,12 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec, // Result of operation error_code const& ec, // Result of operation
std::size_t bytes_written // Number of bytes written to the buffers std::size_t bytes_written // Number of bytes written to the buffers
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -2346,7 +2324,6 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec, // Result of operation error_code const& ec, // Result of operation
@ -2355,7 +2332,6 @@ public:
// this will be less than the buffer_size. // this will be less than the buffer_size.
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -2467,7 +2443,6 @@ public:
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& ec, // Result of operation error_code const& ec, // Result of operation
@ -2476,7 +2451,6 @@ public:
// this will be less than the buffer_size. // this will be less than the buffer_size.
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a

View File

@ -57,8 +57,14 @@ struct stream_base
friend class stream; friend class stream;
public: public:
// Move Constructor
decorator(decorator&&) = default; decorator(decorator&&) = default;
/** Construct a decorator option.
@param f An invocable function object. Ownership of
the function object is transferred by decay-copy.
*/
template<class Decorator> template<class Decorator>
decorator(Decorator&& f) decorator(Decorator&& f)
: d_(std::forward<Decorator>(f)) : d_(std::forward<Decorator>(f))

View File

@ -73,13 +73,11 @@ teardown(
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error // result of operation error_code const& error // result of operation
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a
@ -155,13 +153,11 @@ teardown(
completes. The implementation takes ownership of the handler by completes. The implementation takes ownership of the handler by
performing a decay-copy. The equivalent function signature of performing a decay-copy. The equivalent function signature of
the handler must be: the handler must be:
@code @code
void handler( void handler(
error_code const& error // result of operation error_code const& error // result of operation
); );
@endcode @endcode
Regardless of whether the asynchronous operation completes Regardless of whether the asynchronous operation completes
immediately or not, the handler will not be invoked from within immediately or not, the handler will not be invoked from within
this function. Invocation of the handler will be performed in a this function. Invocation of the handler will be performed in a

View File

@ -87,7 +87,7 @@ public:
body, no more buffers are present. body, no more buffers are present.
@li If the optional contains a value, the first element of the @li If the optional contains a value, the first element of the
pair represents a @b ConstBufferSequence containing one or pair represents a <em>ConstBufferSequence</em> containing one or
more octets of the body data. The second element indicates more octets of the body data. The second element indicates
whether or not there are additional octets of body data. whether or not there are additional octets of body data.
A value of `true` means there is more data, and that the A value of `true` means there is more data, and that the

View File

@ -296,10 +296,10 @@ void fxx() {
/** Send a message to a stream synchronously. /** Send a message to a stream synchronously.
@param stream The stream to write to. This type must support @param stream The stream to write to. This type must support
the @b SyncWriteStream concept. the <em>SyncWriteStream</em> concept.
@param m The message to send. The Body type must support @param m The message to send. The Body type must support
the @b BodyWriter concept. the <em>BodyWriter</em> concept.
*/ */
template< template<
class SyncWriteStream, class SyncWriteStream,