From 164569157acfe16cde43ea94c26a0c34d49a0ef0 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 14 Jun 2017 12:03:19 -0700 Subject: [PATCH] Update doc/ for docca --- CHANGELOG.md | 1 + doc/0_main.qbk | 28 +- doc/3_1_asio.qbk | 4 +- doc/3_2_streams.qbk | 18 +- doc/3_3_buffers.qbk | 40 +- doc/3_4_composed.qbk | 12 +- doc/5_00_http.qbk | 24 +- doc/5_02_message.qbk | 26 +- doc/5_03_streams.qbk | 14 +- doc/5_04_serializer_streams.qbk | 16 +- doc/5_05_parser_streams.qbk | 20 +- doc/5_06_serializer_buffers.qbk | 10 +- doc/5_07_parser_buffers.qbk | 8 +- doc/5_09_custom_body.qbk | 2 +- doc/6_0_http_examples.qbk | 2 +- doc/7_1_streams.qbk | 4 +- doc/7_3_client.qbk | 10 +- doc/7_4_server.qbk | 24 +- doc/7_5_messages.qbk | 2 +- doc/7_6_control.qbk | 12 +- doc/7_7_notes.qbk | 2 +- doc/9_0_design.qbk | 2 +- doc/9_4_faq.qbk | 4 +- doc/Jamfile | 8 +- doc/concept/Body.qbk | 2 +- doc/concept/BodyReader.qbk | 2 +- doc/concept/BodyWriter.qbk | 2 +- doc/concept/Fields.qbk | 2 +- doc/concept/FieldsReader.qbk | 2 +- doc/makeqbk.sh | 11 +- doc/quickref.xml | 236 ++-- doc/reference.xsl | 1866 ---------------------------- doc/source.dox | 4 +- doc/xsl/class_detail.xsl | 48 + doc/xsl/includes.xsl | 5 + doc/xsl/includes_foot.xsl | 16 + doc/xsl/reference.xsl | 13 + examples/doc_core_samples.hpp | 2 +- examples/echo_op.cpp | 2 +- include/beast/core/flat_buffer.hpp | 1 + include/beast/http/fields.hpp | 6 +- include/beast/http/message.hpp | 2 +- 42 files changed, 371 insertions(+), 2144 deletions(-) delete mode 100644 doc/reference.xsl create mode 100644 doc/xsl/class_detail.xsl create mode 100644 doc/xsl/includes.xsl create mode 100644 doc/xsl/includes_foot.xsl create mode 100644 doc/xsl/reference.xsl diff --git a/CHANGELOG.md b/CHANGELOG.md index e358ca0b..e40f7c6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Version 57: * Fix message.hpp javadocs * Fix warning in basic_parser.cpp +* Integrate docca for documentation and tidy -------------------------------------------------------------------------------- diff --git a/doc/0_main.qbk b/doc/0_main.qbk index bf0676b2..b660a332 100644 --- a/doc/0_main.qbk +++ b/doc/0_main.qbk @@ -24,6 +24,8 @@ [template indexterm2[term1 term2] ''''''[term1]''''''[term2]''''''] [template repo_file[path] ''''''[path]''''''] +[template include_file[path][^<''''''[path]''''''>]] + [def __N3747__ [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3747.pdf [*N3747]]] [def __N4588__ [@http://cplusplus.github.io/networking-ts/draft.pdf [*N4588]]] [def __rfc6455__ [@https://tools.ietf.org/html/rfc6455 rfc6455]] @@ -60,19 +62,19 @@ [def __Stream__ [link beast.concept.streams [*Stream]]] [def __SyncStream__ [link beast.concept.streams.SyncStream [*SyncStream]]] -[def __basic_fields__ [link beast.ref.http__basic_fields `basic_fields`]] -[def __basic_multi_buffer__ [link beast.ref.basic_multi_buffer `basic_multi_buffer`]] -[def __basic_parser__ [link beast.ref.http__basic_parser `basic_parser`]] -[def __buffer_body__ [link beast.ref.http__buffer_body `buffer_body`]] -[def __fields__ [link beast.ref.http__fields `fields`]] -[def __flat_buffer__ [link beast.ref.flat_buffer `flat_buffer`]] -[def __header__ [link beast.ref.http__header `header`]] -[def __message__ [link beast.ref.http__message `message`]] -[def __multi_buffer__ [link beast.ref.multi_buffer `multi_buffer`]] -[def __parser__ [link beast.ref.http__parser `parser`]] -[def __serializer__ [link beast.ref.http__serializer `serializer`]] -[def __static_buffer__ [link beast.ref.static_buffer `static_buffer`]] -[def __static_buffer_n__ [link beast.ref.static_buffer_n `static_buffer_n`]] +[def __basic_fields__ [link beast.ref.beast__http__basic_fields `basic_fields`]] +[def __basic_multi_buffer__ [link beast.ref.beast__basic_multi_buffer `basic_multi_buffer`]] +[def __basic_parser__ [link beast.ref.beast__http__basic_parser `basic_parser`]] +[def __buffer_body__ [link beast.ref.beast__http__buffer_body `buffer_body`]] +[def __fields__ [link beast.ref.beast__http__fields `fields`]] +[def __flat_buffer__ [link beast.ref.beast__flat_buffer `flat_buffer`]] +[def __header__ [link beast.ref.beast__http__header `header`]] +[def __message__ [link beast.ref.beast__http__message `message`]] +[def __multi_buffer__ [link beast.ref.beast__multi_buffer `multi_buffer`]] +[def __parser__ [link beast.ref.beast__http__parser `parser`]] +[def __serializer__ [link beast.ref.beast__http__serializer `serializer`]] +[def __static_buffer__ [link beast.ref.beast__static_buffer `static_buffer`]] +[def __static_buffer_n__ [link beast.ref.beast__static_buffer_n `static_buffer_n`]] [import ../examples/file_body.hpp] [import ../examples/http_example.cpp] diff --git a/doc/3_1_asio.qbk b/doc/3_1_asio.qbk index 41a01f70..9e657352 100644 --- a/doc/3_1_asio.qbk +++ b/doc/3_1_asio.qbk @@ -44,10 +44,10 @@ special meaning: which is already connected and has handshaked with a remote host. ]] [[ - [link beast.ref.websocket__stream [*`ws`]] + [link beast.ref.beast__websocket__stream [*`ws`]] ][ A variable of type - [link beast.ref.websocket__stream `websocket::stream`] + [link beast.ref.beast__websocket__stream `websocket::stream`] which is already connected with a remote host. ]] ] diff --git a/doc/3_2_streams.qbk b/doc/3_2_streams.qbk index 7b6d49d1..1c49dd30 100644 --- a/doc/3_2_streams.qbk +++ b/doc/3_2_streams.qbk @@ -60,51 +60,51 @@ checks helps provide more concise errors during compilation: [table Stream Type Checks [[Name][Description]] [[ - [link beast.ref.get_lowest_layer `get_lowest_layer`] + [link beast.ref.beast__get_lowest_layer `get_lowest_layer`] ][ Returns `T::lowest_layer_type` if it exists, else returns `T`. ]] [[ - [link beast.ref.has_get_io_service `has_get_io_service`] + [link beast.ref.beast__has_get_io_service `has_get_io_service`] ][ Determine if the `get_io_service` member function is present, and returns an __io_service__. ]] [[ - [link beast.ref.is_async_read_stream `is_async_read_stream`] + [link beast.ref.beast__is_async_read_stream `is_async_read_stream`] ][ Determine if a type meets the requirements of __AsyncReadStream__. ]] [[ - [link beast.ref.is_async_stream `is_async_stream`] + [link beast.ref.beast__is_async_stream `is_async_stream`] ][ Determine if a type meets the requirements of both __AsyncReadStream__ and __AsyncWriteStream__. ]] [[ - [link beast.ref.is_async_write_stream `is_async_write_stream`] + [link beast.ref.beast__is_async_write_stream `is_async_write_stream`] ][ Determine if a type meets the requirements of __AsyncWriteStream__. ]] [[ - [link beast.ref.is_completion_handler `is_completion_handler`] + [link beast.ref.beast__is_completion_handler `is_completion_handler`] ][ Determine if a type meets the requirements of __CompletionHandler__, and is callable with a specified signature. ]] [[ - [link beast.ref.is_sync_read_stream `is_sync_read_stream`] + [link beast.ref.beast__is_sync_read_stream `is_sync_read_stream`] ][ Determine if a type meets the requirements of __SyncReadStream__. ]] [[ - [link beast.ref.is_sync_stream `is_sync_stream`] + [link beast.ref.beast__is_sync_stream `is_sync_stream`] ][ Determine if a type meets the requirements of both __SyncReadStream__ and __SyncWriteStream__. ]] [[ - [link beast.ref.is_sync_write_stream `is_sync_write_stream`] + [link beast.ref.beast__is_sync_write_stream `is_sync_write_stream`] ][ Determine if a type meets the requirements of __SyncWriteStream__. ]] diff --git a/doc/3_3_buffers.qbk b/doc/3_3_buffers.qbk index ddf11fa4..bac0b568 100644 --- a/doc/3_3_buffers.qbk +++ b/doc/3_3_buffers.qbk @@ -19,17 +19,17 @@ These metafunctions check if types match the buffer concepts: [table Buffer Type Checks [[Name][Description]] [[ - [link beast.ref.is_dynamic_buffer `is_dynamic_buffer`] + [link beast.ref.beast__is_dynamic_buffer `is_dynamic_buffer`] ][ Determine if a type meets the requirements of __DynamicBuffer__. ]] [[ - [link beast.ref.is_const_buffer_sequence `is_const_buffer_sequence`] + [link beast.ref.beast__is_const_buffer_sequence `is_const_buffer_sequence`] ][ Determine if a type meets the requirements of __ConstBufferSequence__. ]] [[ - [link beast.ref.is_mutable_buffer_sequence `is_mutable_buffer_sequence`] + [link beast.ref.beast__is_mutable_buffer_sequence `is_mutable_buffer_sequence`] ][ Determine if a type meets the requirements of __MutableBufferSequence__. ]] @@ -40,7 +40,7 @@ To suit various needs, several implementation of dynamic buffer are available: [table Dynamic Buffer Implementations [[Name][Description]] [[ - [link beast.ref.buffers_adapter `buffers_adapter`] + [link beast.ref.beast__buffers_adapter `buffers_adapter`] ][ This wrapper adapts any __MutableBufferSequence__ into a __DynamicBuffer__ with an upper limit on the total size of the input and @@ -48,7 +48,7 @@ To suit various needs, several implementation of dynamic buffer are available: The implementation does not perform heap allocations. ]] [[ - [link beast.ref.drain_buffer `drain_buffer`] + [link beast.ref.beast__drain_buffer `drain_buffer`] ][ A drain buffer has a small internal buffer and maximum size that uses no dynamic allocation. It always has a size of zero, and @@ -57,8 +57,8 @@ To suit various needs, several implementation of dynamic buffer are available: efficiently discard the data. ]] [[ - [link beast.ref.flat_buffer `flat_buffer`] - [link beast.ref.basic_flat_buffer `basic_flat_buffer`] + [link beast.ref.beast__flat_buffer `flat_buffer`] + [link beast.ref.beast__basic_flat_buffer `basic_flat_buffer`] ][ Guarantees that input and output areas are buffer sequences with length one. Upon construction an optional upper limit to the total @@ -66,8 +66,8 @@ To suit various needs, several implementation of dynamic buffer are available: supports the standard allocator model. ]] [[ - [link beast.ref.multi_buffer `multi_buffer`] - [link beast.ref.basic_multi_buffer `basic_multi_buffer`] + [link beast.ref.beast__multi_buffer `multi_buffer`] + [link beast.ref.beast__basic_multi_buffer `basic_multi_buffer`] ][ Uses a sequence of one or more character arrays of varying sizes. Additional character array objects are appended to the sequence to @@ -75,8 +75,8 @@ To suit various needs, several implementation of dynamic buffer are available: container supports the standard allocator model. ]] [[ - [link beast.ref.static_buffer `static_buffer`] - [link beast.ref.static_buffer `static_buffer_n`] + [link beast.ref.beast__static_buffer `static_buffer`] + [link beast.ref.beast__static_buffer `static_buffer_n`] ][ Provides the facilities of a dynamic buffer, subject to an upper limit placed on the total size of the input and output areas defined @@ -97,7 +97,7 @@ transferred. [table Buffer Algorithms [[Name][Description]] [[ - [link beast.ref.buffer_cat `buffer_cat`] + [link beast.ref.beast__buffer_cat `buffer_cat`] ][ This functions returns a new buffer sequence which, when iterated, traverses the sequence which would be formed if all of the input buffer @@ -106,27 +106,27 @@ transferred. expensive system calls. ]] [[ - [link beast.ref.buffer_cat_view `buffer_cat_view`] + [link beast.ref.beast__buffer_cat_view `buffer_cat_view`] ][ This class represents the buffer sequence formed by concatenating two or more buffer sequences. This is type of object returned by - [link beast.ref.buffer_cat `buffer_cat`]. + [link beast.ref.beast__buffer_cat `buffer_cat`]. ]] [[ - [link beast.ref.buffer_prefix `buffer_prefix`] + [link beast.ref.beast__buffer_prefix `buffer_prefix`] ][ This function returns a new buffer or buffer sequence which represents a prefix of the original buffers. ]] [[ - [link beast.ref.buffer_prefix_view `buffer_prefix_view`] + [link beast.ref.beast__buffer_prefix_view `buffer_prefix_view`] ][ This class represents the buffer sequence formed from a prefix of an existing buffer sequence. This is the type of buffer returned by - [link beast.ref.buffer_prefix `buffer_prefix`]. + [link beast.ref.beast__buffer_prefix `buffer_prefix`]. ]] [[ - [link beast.ref.consuming_buffers `consuming_buffers`] + [link beast.ref.beast__consuming_buffers `consuming_buffers`] ][ This class wraps the underlying memory of an existing buffer sequence and presents a suffix of the original sequence. The length of the suffix @@ -141,13 +141,13 @@ output streams. [table Buffer Output Streams [[Name][Description]] [[ - [link beast.ref.buffers `buffers`] + [link beast.ref.beast__buffers `buffers`] ][ This function wraps a __ConstBufferSequence__ so it may be used with `operator<<` and `std::ostream`. ]] [[ - [link beast.ref.ostream `ostream`] + [link beast.ref.beast__ostream `ostream`] ][ This function returns a `std::ostream` which wraps a dynamic buffer. Characters sent to the stream using `operator<<` is stored in the diff --git a/doc/3_4_composed.qbk b/doc/3_4_composed.qbk index a4461ccf..50c083f7 100644 --- a/doc/3_4_composed.qbk +++ b/doc/3_4_composed.qbk @@ -42,7 +42,7 @@ available: [table Asynchronous Helpers [[Name][Description]] [[ - [link beast.ref.async_completion `async_completion`] + [link beast.ref.beast__async_completion `async_completion`] ][ This class aggregates the completion handler customization point and the asynchronous initiation function return value customization point @@ -51,7 +51,7 @@ available: implement an initiation function using the Extensible Model. ]] [[ - [link beast.ref.async_return_type `async_return_type`] + [link beast.ref.beast__async_return_type `async_return_type`] ][ This template alias determines the return value of an asynchronous initiation function given the completion token and signature. It is used @@ -59,7 +59,7 @@ available: Extensible Asynchronous Model. ]] [[ - [link beast.ref.bind_handler `bind_handler`] + [link beast.ref.beast__bind_handler `bind_handler`] ][ This function returns a new, nullary completion handler which when invoked with no arguments invokes the original completion handler with a @@ -70,7 +70,7 @@ available: ]] [[ - [link beast.ref.handler_alloc `handler_alloc`] + [link beast.ref.beast__handler_alloc `handler_alloc`] ][ This class meets the requirements of [*Allocator], and uses any custom memory allocation and deallocation hooks associated with a given handler. @@ -79,7 +79,7 @@ available: must be freed before the final completion handler is invoked. ]] [[ - [link beast.ref.handler_ptr `handler_ptr`] + [link beast.ref.beast__handler_ptr `handler_ptr`] ][ This is a smart pointer container used to manage the internal state of a composed operation. It is useful when the state is non trivial. For example @@ -91,7 +91,7 @@ available: optimizations transparently. ]] [[ - [link beast.ref.handler_type `handler_type`] + [link beast.ref.beast__handler_type `handler_type`] ][ This template alias converts a completion token and signature to the correct completion handler type. It is used in the implementation of diff --git a/doc/5_00_http.qbk b/doc/5_00_http.qbk index 48b07258..2da28bc1 100644 --- a/doc/5_00_http.qbk +++ b/doc/5_00_http.qbk @@ -31,12 +31,12 @@ format using __Asio__. Specifically, the library provides: [Stream Reading] [ The functions - [link beast.ref.http__read `read`], - [link beast.ref.http__read_header `read_header`], - [link beast.ref.http__read_some `read_some`], - [link beast.ref.http__async_read `async_read`], - [link beast.ref.http__async_read_header `async_read_header`], and - [link beast.ref.http__async_read_some `async_read_some`] + [link beast.ref.beast__http__read `read`], + [link beast.ref.beast__http__read_header `read_header`], + [link beast.ref.beast__http__read_some `read_some`], + [link beast.ref.beast__http__async_read `async_read`], + [link beast.ref.beast__http__async_read_header `async_read_header`], and + [link beast.ref.beast__http__async_read_some `async_read_some`] read HTTP/1 message data from a [link beast.concept.streams stream]. ] @@ -44,12 +44,12 @@ format using __Asio__. Specifically, the library provides: [Stream Writing] [ The functions - [link beast.ref.http__write `write`], - [link beast.ref.http__write_header `write_header`], - [link beast.ref.http__write_some `write_some`], - [link beast.ref.http__async_write `async_write`], - [link beast.ref.http__async_write_header `async_write_header`], and - [link beast.ref.http__async_write_some `async_write_some`] + [link beast.ref.beast__http__write `write`], + [link beast.ref.beast__http__write_header `write_header`], + [link beast.ref.beast__http__write_some `write_some`], + [link beast.ref.beast__http__async_write `async_write`], + [link beast.ref.beast__http__async_write_header `async_write_header`], and + [link beast.ref.beast__http__async_write_some `async_write_some`] write HTTP/1 message data to a [link beast.concept.streams stream]. ] diff --git a/doc/5_02_message.qbk b/doc/5_02_message.qbk index 14c8226a..b457c2af 100644 --- a/doc/5_02_message.qbk +++ b/doc/5_02_message.qbk @@ -57,8 +57,8 @@ each possible value of `isRequest`: [$images/message.png [width 730px] [height 410px]] The template type aliases -[link beast.ref.http__request `request`] and -[link beast.ref.http__response `response`] +[link beast.ref.beast__http__request `request`] and +[link beast.ref.beast__http__response `response`] are provided for brevity. They specify the common default of `fields`. ``` @@ -74,7 +74,7 @@ using response = message; [heading:body Body Types] Beast defines the __Body__ concept, which determines both the type of -the [link beast.ref.http__message.body `message::body`] member +the [link beast.ref.beast__http__message.body `message::body`] member (as seen in the diagram above) and may also include algorithms for transferring buffers in and out. These algorithms are used during parsing and serialization. These body types are available within the @@ -84,26 +84,26 @@ __Body__ requirements: [table [[Name][Description]] [[ - [link beast.ref.http__buffer_body `buffer_body`] + [link beast.ref.beast__http__buffer_body `buffer_body`] ][ A body whose - [link beast.ref.http__buffer_body__value_type `value_type`] + [link beast.ref.beast__http__buffer_body__value_type `value_type`] holds a raw pointer and size to a caller-provided buffer. This allows for serialization of body data coming from external sources, and incremental parsing of message body content using a fixed size buffer. ]] [[ - [link beast.ref.http__dynamic_body `dynamic_body`] + [link beast.ref.beast__http__dynamic_body `dynamic_body`] - [link beast.ref.http__basic_dynamic_body `basic_dynamic_body`] + [link beast.ref.beast__http__basic_dynamic_body `basic_dynamic_body`] ][ A body whose `value_type` is a __DynamicBuffer__. It inherits the insertion complexity of the underlying choice of dynamic buffer. Messages with this body type may be serialized and parsed. ]] [[ - [link beast.ref.http__empty_body `empty_body`] + [link beast.ref.beast__http__empty_body `empty_body`] ][ A special body with an empty `value_type` indicating that the message has no body. Messages with this body may be serialized @@ -111,7 +111,7 @@ __Body__ requirements: with this body will generate a unique error. ]] [[ - [link beast.ref.http__string_body `string_body`] + [link beast.ref.beast__http__string_body `string_body`] ][ A body whose `value_type` is `std::string`. Insertion complexity is amortized constant time, while capacity grows geometrically. @@ -119,9 +119,9 @@ __Body__ requirements: is the type of body used in the examples. ]] [[ - [link beast.ref.http__string_view_body `string_view_body`] + [link beast.ref.beast__http__string_view_body `string_view_body`] ][ - A body whose `value_type` is [link beast.ref.string_view `string_view`]. + A body whose `value_type` is [link beast.ref.beast__string_view `string_view`]. Messages with this body type may be serialized only, and the caller is responsible for managing the lifetime of the buffer pointed to by the string view. @@ -151,7 +151,7 @@ request. Here we create an HTTP response indicating success. Note that this message has a body. The function -[link beast.ref.http__message.prepare prepare] +[link beast.ref.beast__http__message.prepare prepare] automatically sets the Content-Length or Transfer-Encoding field depending on the content and type of the `body` member. The use of prepare is optional; these fields may also be set explicitly. @@ -175,6 +175,6 @@ The implementation will automatically fill in the obsolete [@https://tools.ietf.org/html/rfc7230#section-3.1.2 reason-phrase] from the status code when serializing a message. Or it may be set directly using -[link beast.ref.http__header.reason.overload2 `header::reason`]. +[link beast.ref.beast__http__header.reason.overload2 `header::reason`]. [endsect] diff --git a/doc/5_03_streams.qbk b/doc/5_03_streams.qbk index 336d2c40..1107a9ba 100644 --- a/doc/5_03_streams.qbk +++ b/doc/5_03_streams.qbk @@ -14,22 +14,22 @@ the message-oriented stream interface: [table Message Stream Operations [[Name][Description]] [[ - [link beast.ref.http__read.overload3 [*read]] + [link beast.ref.beast__http__read.overload3 [*read]] ][ Read a __message__ from a __SyncReadStream__. ]] [[ - [link beast.ref.http__async_read.overload2 [*async_read]] + [link beast.ref.beast__http__async_read.overload2 [*async_read]] ][ Read a __message__ from an __AsyncReadStream__. ]] [[ - [link beast.ref.http__write.overload1 [*write]] + [link beast.ref.beast__http__write.overload1 [*write]] ][ Write a __message__ to a __SyncWriteStream__. ]] [[ - [link beast.ref.http__async_write [*async_write]] + [link beast.ref.beast__http__async_write [*async_write]] ][ Write a __message__ to an __AsyncWriteStream__. ]] @@ -37,7 +37,7 @@ the message-oriented stream interface: All synchronous stream operations come in two varieties. One which throws an exception upon error, and another which accepts as the last parameter an -argument of type [link beast.ref.error_code `error_code&`]. If an error +argument of type [link beast.ref.beast__error_code `error_code&`]. If an error occurs this argument will be set to contain the error code. @@ -77,7 +77,7 @@ code indicating the result is printed: If a read stream algorithm cannot complete its operation without exceeding the maximum specified size of the dynamic buffer provided, the error -[link beast.ref.http__error `buffer_overflow`] +[link beast.ref.beast__http__error `buffer_overflow`] is returned. This may be used to impose a limit on the maximum size of an HTTP message header for protection from buffer overflow attacks. The following code will generate an error: @@ -92,7 +92,7 @@ A set of free functions allow serialization of an entire HTTP message to a stream. If a response has no declared content length, and no chunked transfer encoding, the end of the message is indicated by the server closing the connection. When sending such a response, Beast will return the -[link beast.ref.http__error `error::end_of_stream`] +[link beast.ref.beast__http__error `error::end_of_stream`] from the write algorithm to indicate to the caller that the connection should be closed. This example constructs and sends a response whose body length is determined by diff --git a/doc/5_04_serializer_streams.qbk b/doc/5_04_serializer_streams.qbk index d3dde40a..df0ba9eb 100644 --- a/doc/5_04_serializer_streams.qbk +++ b/doc/5_04_serializer_streams.qbk @@ -30,7 +30,7 @@ This code creates an HTTP response and the corresponding serializer: [http_snippet_10] The function -[link beast.ref.http__make_serializer `make_serializer`] +[link beast.ref.beast__http__make_serializer `make_serializer`] is provided to simplify creation of variables: [http_snippet_11] @@ -40,32 +40,32 @@ The stream operations which work on serializers are: [table Serializer Stream Operations [[Name][Description]] [[ - [link beast.ref.http__write.overload1 [*write]] + [link beast.ref.beast__http__write.overload1 [*write]] ][ Send everything in a __serializer__ to a __SyncWriteStream__. ]] [[ - [link beast.ref.http__async_write.overload1 [*async_write]] + [link beast.ref.beast__http__async_write.overload1 [*async_write]] ][ Send everything in a __serializer__ asynchronously to an __AsyncWriteStream__. ]] [[ - [link beast.ref.http__write_header.overload1 [*write_header]] + [link beast.ref.beast__http__write_header.overload1 [*write_header]] ][ Send only the header from a __serializer__ to a __SyncWriteStream__. ]] [[ - [link beast.ref.http__async_write_header [*async_write_header]] + [link beast.ref.beast__http__async_write_header [*async_write_header]] ][ Send only the header from a __serializer__ asynchronously to an __AsyncWriteStream__. ]] [[ - [link beast.ref.http__write_some.overload1 [*write_some]] + [link beast.ref.beast__http__write_some.overload1 [*write_some]] ][ Send part of a __serializer__ to a __SyncWriteStream__. ]] [[ - [link beast.ref.http__async_write_some [*async_write_some]] + [link beast.ref.beast__http__async_write_some [*async_write_some]] ][ Send part of a __serializer__ asynchronously to an __AsyncWriteStream__. ]] @@ -90,7 +90,7 @@ and trailers may instantiate the serializer with a "chunk decorator" type, and pass an instance of the type upon construction. This decorator is a function object which, when invoked with a __ConstBufferSequence__, returns a -[link beast.ref.string_view `string_view`] containing either the extensions +[link beast.ref.beast__string_view `string_view`] containing either the extensions or the trailer. For chunks containing body data, the passed buffer will contain one or more corresponding body octets. The decorator may use this information as needed. For example, to compute a digest on the data and diff --git a/doc/5_05_parser_streams.qbk b/doc/5_05_parser_streams.qbk index cb87fd7b..e5e5d009 100644 --- a/doc/5_05_parser_streams.qbk +++ b/doc/5_05_parser_streams.qbk @@ -40,7 +40,7 @@ __message__ objects; user-defined parsers are also possible: ``` ]] [[ - [link beast.ref.http__request_parser `request_parser`] + [link beast.ref.beast__http__request_parser `request_parser`] ][ ``` /// An HTTP/1 parser for producing a request message. @@ -49,7 +49,7 @@ __message__ objects; user-defined parsers are also possible: ``` ]] [[ - [link beast.ref.http__response_parser `response_parser`] + [link beast.ref.beast__http__response_parser `response_parser`] ][ ``` /// An HTTP/1 parser for producing a response message. @@ -69,32 +69,32 @@ The stream operations which work on parsers are: [table Parser Stream Operations [[Name][Description]] [[ - [link beast.ref.http__read.overload1 [*read]] + [link beast.ref.beast__http__read.overload1 [*read]] ][ Read everything into a parser from a __SyncWriteStream__. ]] [[ - [link beast.ref.http__async_read.overload1 [*async_read]] + [link beast.ref.beast__http__async_read.overload1 [*async_read]] ][ Read everything into a parser asynchronously from an __AsyncWriteStream__. ]] [[ - [link beast.ref.http__read_header.overload1 [*read_header]] + [link beast.ref.beast__http__read_header.overload1 [*read_header]] ][ Read only the header octets into a parser from a __SyncWriteStream__. ]] [[ - [link beast.ref.http__async_read_header [*async_read_header]] + [link beast.ref.beast__http__async_read_header [*async_read_header]] ][ Read only the header octets into a parser asynchronously from an __AsyncWriteStream__. ]] [[ - [link beast.ref.http__read_some.overload1 [*read_some]] + [link beast.ref.beast__http__read_some.overload1 [*read_some]] ][ Read some octets into a parser from a __SyncReadStream__. ]] [[ - [link beast.ref.http__async_read_some [*async_read_some]] + [link beast.ref.beast__http__async_read_some [*async_read_some]] ][ Read some octets into a parser asynchronously from an __AsyncWriteStream__. ]] @@ -111,10 +111,10 @@ __DynamicBuffer__ which produces input sequences of length one is also suitable. The parser contains a message constructed internally. Arguments passed to the parser's constructor are forwarded into the message container. The caller can access the message inside the parser by calling -[link beast.ref.http__parser.get `parser::get`]. +[link beast.ref.beast__http__parser.get `parser::get`]. If the `Fields` and `Body` types are [*MoveConstructible], the caller can take ownership of the message by calling -[link beast.ref.http__parser.release `parser::release`]. In this example +[link beast.ref.beast__http__parser.release `parser::release`]. In this example we read an HTTP response with a string body using a parser, then print the response: diff --git a/doc/5_06_serializer_buffers.qbk b/doc/5_06_serializer_buffers.qbk index be9823ca..b961531f 100644 --- a/doc/5_06_serializer_buffers.qbk +++ b/doc/5_06_serializer_buffers.qbk @@ -17,15 +17,15 @@ to produce buffers until all of the buffers have been generated. Then the serializer is destroyed. To obtain the serialized next buffer sequence, call -[link beast.ref.http__serializer.get `serializer::get`]. +[link beast.ref.beast__http__serializer.get `serializer::get`]. Then, call -[link beast.ref.http__serializer.consume `serializer::consume`] +[link beast.ref.beast__http__serializer.consume `serializer::consume`] to indicate the number of bytes consumed. This updates the next set of buffers to be returned, if any. `serializer::get` takes an error code parameter and invokes a visitor argument with the error code and buffer of unspecified type. In C++14 this is easily expressed with a generic lambda. The function -[link beast.ref.http__serializer.is_done `serializer::is_done`] +[link beast.ref.beast__http__serializer.is_done `serializer::is_done`] will return `true` when all the buffers have been produced. This C++14 example prints the buffers to standard output: @@ -43,11 +43,11 @@ In some cases, such as the handling of the field, it may be desired to first serialize the header, perform some other action, and then continue with serialization of the body. This is accomplished by calling -[link beast.ref.http__serializer.split `serializer::split`] +[link beast.ref.beast__http__serializer.split `serializer::split`] with a boolean indicating that when buffers are produced, the last buffer containing serialized header octets will not contain any octets corresponding to the body. The function -[link beast.ref.http__serializer.is_header_done `serializer::is_header_done`] +[link beast.ref.beast__http__serializer.is_header_done `serializer::is_header_done`] informs the caller whether the header been serialized fully. In this C++14 example we print the header first, followed by the body: diff --git a/doc/5_07_parser_buffers.qbk b/doc/5_07_parser_buffers.qbk index d5243fe7..045812da 100644 --- a/doc/5_07_parser_buffers.qbk +++ b/doc/5_07_parser_buffers.qbk @@ -13,10 +13,10 @@ algorithms on objects whose interface does not conform to __Stream__. For example, a [@http://zeromq.org/ *ZeroMQ* socket]. The basic parser interface is interactive; the caller invokes the function -[link beast.ref.http__basic_parser.put `basic_parser::put`] +[link beast.ref.beast__http__basic_parser.put `basic_parser::put`] repeatedly with buffers until an error occurs or the parsing is done. The function -[link beast.ref.http__basic_parser.put_eof `basic_parser::put_eof`] +[link beast.ref.beast__http__basic_parser.put_eof `basic_parser::put_eof`] Is used when the caller knows that there will never be more data (for example, if the underlying connection is closed), @@ -27,7 +27,7 @@ The parser provides two options which may be set before parsing begins: [table Parser Options [[Name][Default][Description]] [[ - [link beast.ref.http__basic_parser.eager.overload2 `eager`] + [link beast.ref.beast__http__basic_parser.eager.overload2 `eager`] ][ `false` ][ @@ -42,7 +42,7 @@ The parser provides two options which may be set before parsing begins: stream operations to improve performance with no change in functionality. ]] [[ - [link beast.ref.http__basic_parser.skip.overload2 `skip`] + [link beast.ref.beast__http__basic_parser.skip.overload2 `skip`] ][ `false` ][ diff --git a/doc/5_09_custom_body.qbk b/doc/5_09_custom_body.qbk index bd5ef8d3..71f1f045 100644 --- a/doc/5_09_custom_body.qbk +++ b/doc/5_09_custom_body.qbk @@ -21,7 +21,7 @@ The meaning of the nested types is as follows [`value_type`] [ Determines the type of the - [link beast.ref.http__message.body `message::body`] + [link beast.ref.beast__http__message.body `message::body`] member. ] ][ diff --git a/doc/6_0_http_examples.qbk b/doc/6_0_http_examples.qbk index 81bd7a7a..2e8cd7fb 100644 --- a/doc/6_0_http_examples.qbk +++ b/doc/6_0_http_examples.qbk @@ -20,7 +20,7 @@ until after the header is available. Then, a body type may be chosen depending on the header contents. For example, depending on the verb, target path, or target query parameters. To accomplish this, a parser is declared to read in the header only, using a trivial body type such as -[link beast.ref.http__empty_body `empty_body`]. Then, a new parser is constructed +[link beast.ref.beast__http__empty_body `empty_body`]. Then, a new parser is constructed from this existing parser where the body type is conditionally determined by information from the header or elsewhere. diff --git a/doc/7_1_streams.qbk b/doc/7_1_streams.qbk index 85534eaa..489d8654 100644 --- a/doc/7_1_streams.qbk +++ b/doc/7_1_streams.qbk @@ -8,7 +8,7 @@ [section:streams Creating Streams] The interface to the WebSocket implementation is a single template class -[link beast.ref.websocket__stream `stream`] +[link beast.ref.beast__websocket__stream `stream`] which wraps an existing network transport object or other type of octet oriented stream. The wrapped object is called the "next layer" and must meet the requirements of __SyncStream__ if synchronous @@ -52,7 +52,7 @@ underlying socket being wrapped: Once the WebSocket stream wrapper is created, the wrapped object may be accessed by calling -[link beast.ref.websocket__stream.next_layer.overload1 `stream::next_layer`]: +[link beast.ref.beast__websocket__stream.next_layer.overload1 `stream::next_layer`]: [ws_snippet_5] diff --git a/doc/7_3_client.qbk b/doc/7_3_client.qbk index d1d11e48..0ebdf603 100644 --- a/doc/7_3_client.qbk +++ b/doc/7_3_client.qbk @@ -18,8 +18,8 @@ The Upgrade request must include the field, and the [@https://tools.ietf.org/html/rfc7230#section-5.3 target] of the resource to request. The stream member functions -[link beast.ref.websocket__stream.handshake.overload1 `handshake`] and -[link beast.ref.websocket__stream.async_handshake.overload1 `async_handshake`] +[link beast.ref.beast__websocket__stream.handshake.overload1 `handshake`] and +[link beast.ref.beast__websocket__stream.async_handshake.overload1 `async_handshake`] are used to send the request with the required host and target strings. [ws_snippet_8] @@ -49,8 +49,8 @@ looks like this: [heading Decorators] If the caller wishes to add or modify fields, the member functions -[link beast.ref.websocket__stream.handshake_ex `handshake_ex`] and -[link beast.ref.websocket__stream.async_handshake_ex `async_handshake_ex`] +[link beast.ref.beast__websocket__stream.handshake_ex `handshake_ex`] and +[link beast.ref.beast__websocket__stream.async_handshake_ex `async_handshake_ex`] are provided which allow an additional function object, called a ['decorator], to be passed. The decorator is invoked to modify the HTTP Upgrade request as needed. This example sets a subprotocol @@ -87,7 +87,7 @@ on the received HTTP response message. For example, to check that the response to a basic authentication challenge is valid. To achieve this, overloads of the handshake member function allow the caller to store the received HTTP message in an output reference argument as -[link beast.ref.websocket__response_type `response_type`] +[link beast.ref.beast__websocket__response_type `response_type`] as follows: [ws_snippet_10] diff --git a/doc/7_4_server.qbk b/doc/7_4_server.qbk index c281f565..f2d90fc3 100644 --- a/doc/7_4_server.qbk +++ b/doc/7_4_server.qbk @@ -8,7 +8,7 @@ [section:server Handshaking (Servers)] A -[link beast.ref.websocket__stream `stream`] +[link beast.ref.beast__websocket__stream `stream`] automatically handles receiving and processing the HTTP response to the handshake request. The call to handshake is successful if a HTTP response is received with the 101 "Switching Protocols" status code. On failure, @@ -41,8 +41,8 @@ typically look like this: [heading Decorators] If the caller wishes to add or modify fields, the member functions -[link beast.ref.websocket__stream.accept_ex `accept_ex`] and -[link beast.ref.websocket__stream.async_accept_ex `async_accept_ex`] +[link beast.ref.beast__websocket__stream.accept_ex `accept_ex`] and +[link beast.ref.beast__websocket__stream.async_accept_ex `async_accept_ex`] are provided which allow an additional function object, called a ['decorator], to be passed. The decorator is invoked to modify the HTTP Upgrade request as needed. This example sets the Server @@ -77,14 +77,14 @@ The HTTP Upgrade response produced by the previous call looks like this: When implementing an HTTP server that also supports WebSocket, the server usually reads the HTTP request from the client. To detect when the incoming HTTP request is a WebSocket Upgrade request, the function -[link beast.ref.websocket__is_upgrade `is_upgrade`] may be used. +[link beast.ref.beast__websocket__is_upgrade `is_upgrade`] may be used. Once the caller determines that the HTTP request is a WebSocket Upgrade, additional overloads of -[link beast.ref.websocket__stream.accept `accept`], -[link beast.ref.websocket__stream.accept_ex `accept_ex`], -[link beast.ref.websocket__stream.async_accept `async_accept`], and -[link beast.ref.websocket__stream.async_accept_ex `async_accept_ex`] +[link beast.ref.beast__websocket__stream.accept `accept`], +[link beast.ref.beast__websocket__stream.accept_ex `accept_ex`], +[link beast.ref.beast__websocket__stream.async_accept `async_accept`], and +[link beast.ref.beast__websocket__stream.async_accept_ex `async_accept_ex`] are provided which receive the entire HTTP request header as an object to perform the handshake. In this example, the request is first read in using the HTTP algorithms, and then passed to a newly constructed @@ -100,10 +100,10 @@ the first 6 octets after accepting an incoming connection to determine if a TLS protocol is being negotiated, and choose a suitable implementation at run-time. In the case where the server wishes to accept the incoming request as an HTTP WebSocket Upgrade request, additional overloads of -[link beast.ref.websocket__stream.accept `accept`], -[link beast.ref.websocket__stream.accept_ex `accept_ex`], -[link beast.ref.websocket__stream.async_accept `async_accept`], and -[link beast.ref.websocket__stream.async_accept_ex `async_accept_ex`] +[link beast.ref.beast__websocket__stream.accept `accept`], +[link beast.ref.beast__websocket__stream.accept_ex `accept_ex`], +[link beast.ref.beast__websocket__stream.async_accept `async_accept`], and +[link beast.ref.beast__websocket__stream.async_accept_ex `async_accept_ex`] are provided which receive the additional buffered octets and consume them as part of the handshake. diff --git a/doc/7_5_messages.qbk b/doc/7_5_messages.qbk index f6c2d512..88e973d3 100644 --- a/doc/7_5_messages.qbk +++ b/doc/7_5_messages.qbk @@ -14,7 +14,7 @@ all of the buffers representing the message are known ahead of time: [ws_snippet_15] [important - Calls to [link beast.ref.websocket__stream.set_option `set_option`] + Calls to [link beast.ref.beast__websocket__stream.set_option `set_option`] must be made from the same implicit or explicit strand as that used to perform other operations. ] diff --git a/doc/7_6_control.qbk b/doc/7_6_control.qbk index f15e1071..c94edf80 100644 --- a/doc/7_6_control.qbk +++ b/doc/7_6_control.qbk @@ -25,7 +25,7 @@ During read operations, Beast automatically reads and processes control frames. Pings are replied to as soon as possible with a pong, received ping and pongs are delivered to the ping callback. The receipt of a close frame initiates the WebSocket close procedure, eventually resulting in the -error code [link beast.ref.websocket__error `error::closed`] being delivered +error code [link beast.ref.beast__websocket__error `error::closed`] being delivered to the caller in a subsequent read operation, assuming no other error takes place. @@ -42,11 +42,11 @@ while the implementation also automatically handles control frames. Ping and pong messages are control frames which may be sent at any time by either peer on an established WebSocket connection. They are sent using the functions -[link beast.ref.websocket__stream.ping `ping`] and -[link beast.ref.websocket__stream.pong `pong`]. +[link beast.ref.beast__websocket__stream.ping `ping`] and +[link beast.ref.beast__websocket__stream.pong `pong`]. To be notified of ping and pong control frames, callers may register a -"ping callback" using [link beast.ref.websocket__stream.set_option `set_option`]. +"ping callback" using [link beast.ref.beast__websocket__stream.set_option `set_option`]. The object provided with this option should be callable with the following signature: @@ -77,7 +77,7 @@ The WebSocket protocol defines a procedure and control message for initiating a close of the session. Handling of close initiated by the remote end of the connection is performed automatically. To manually initiate a close, use the -[link beast.ref.websocket__stream.close `close`] function: +[link beast.ref.beast__websocket__stream.close `close`] function: [ws_snippet_18] @@ -92,7 +92,7 @@ before it receives and responds to the close frame. [important To receive the - [link beast.ref.websocket__error `error::closed`] + [link beast.ref.beast__websocket__error `error::closed`] error, a read operation is required. ] diff --git a/doc/7_7_notes.qbk b/doc/7_7_notes.qbk index 4c97b30a..83650b50 100644 --- a/doc/7_7_notes.qbk +++ b/doc/7_7_notes.qbk @@ -40,7 +40,7 @@ or require threads. [heading Thread Safety] Like a regular __Asio__ socket, a -[link beast.ref.websocket__stream `stream`] +[link beast.ref.beast__websocket__stream `stream`] is not thread safe. Callers are responsible for synchronizing operations on the socket using an implicit or explicit strand, as per the Asio documentation. The asynchronous interface supports one active read and one active write diff --git a/doc/9_0_design.qbk b/doc/9_0_design.qbk index 45547cd8..7cdd66a8 100644 --- a/doc/9_0_design.qbk +++ b/doc/9_0_design.qbk @@ -30,7 +30,7 @@ __MutableBufferSequence__ concepts for passing buffers to functions. The authors have found the dynamic buffer and buffer sequence interfaces to be optimal for interacting with Asio, and for other tasks such as incremental parsing of data in buffers (for example, parsing websocket frames stored -in a [link beast.ref.static_buffer `static_buffer`]). +in a [link beast.ref.beast__static_buffer `static_buffer`]). During the development of Beast the authors have studied other software packages and in particular the comments left during the Boost Review process diff --git a/doc/9_4_faq.qbk b/doc/9_4_faq.qbk index d304c8f9..96e6730b 100644 --- a/doc/9_4_faq.qbk +++ b/doc/9_4_faq.qbk @@ -268,8 +268,8 @@ about Beast and other HTTP libraries that have gone through formal review. The WebSocket implementation [*does] provide support for shutting down the TLS connection through the use of the ADL compile-time virtual functions - [link beast.ref.websocket__teardown `teardown`] and - [link beast.ref.websocket__async_teardown `async_teardown`]. These will + [link beast.ref.beast__websocket__teardown `teardown`] and + [link beast.ref.beast__websocket__async_teardown `async_teardown`]. These will properly close the connection as per rfc6455 and overloads are available for TLS streams. Callers may provide their own overloads of these functions for user-defined next layer types. diff --git a/doc/Jamfile b/doc/Jamfile index 4b21611f..4f76c980 100644 --- a/doc/Jamfile +++ b/doc/Jamfile @@ -17,13 +17,13 @@ using doxygen ; import quickbook ; -path-constant here : . ; +path-constant out : . ; install stylesheets : $(broot)/doc/src/boostbook.css : - $(here)/html + $(out)/html ; explicit stylesheets ; @@ -35,7 +35,7 @@ install images images/body.png images/message.png : - $(here)/html/images + $(out)/html/images ; explicit images ; @@ -44,7 +44,7 @@ install callouts : [ glob $(broot)/doc/src/images/callouts/*.png ] : - $(here)/html/images/callouts + $(out)/html/images/callouts ; explicit callout ; diff --git a/doc/concept/Body.qbk b/doc/concept/Body.qbk index 1b52b451..0214dffa 100644 --- a/doc/concept/Body.qbk +++ b/doc/concept/Body.qbk @@ -53,7 +53,7 @@ In this table: [ If present, returns the serialized size of `m.body` not including any chunked transfer encoding. When this function is provided, - [link beast.ref.http__message.prepare `message::prepare`] + [link beast.ref.beast__http__message.prepare `message::prepare`] will automatically set the content length field based on the value. Otherwise, the chunked transfer encoding will be set. ] diff --git a/doc/concept/BodyReader.qbk b/doc/concept/BodyReader.qbk index 4aa80bae..bfbd9596 100644 --- a/doc/concept/BodyReader.qbk +++ b/doc/concept/BodyReader.qbk @@ -32,7 +32,7 @@ In this table: * `m` denotes a value of type `message const&` where `std::is_same:value == true`. -* `ec` is a value of type [link beast.ref.error_code `error_code&`]. +* `ec` is a value of type [link beast.ref.beast__error_code `error_code&`]. * `R` is the type `boost::optional>`. diff --git a/doc/concept/BodyWriter.qbk b/doc/concept/BodyWriter.qbk index e8c22fc4..95e648b7 100644 --- a/doc/concept/BodyWriter.qbk +++ b/doc/concept/BodyWriter.qbk @@ -36,7 +36,7 @@ In the table below: * `m` denotes a value of type `message&` where `std::is_same::value == true`. -* `ec` is a value of type [link beast.ref.error_code `error_code&`]. +* `ec` is a value of type [link beast.ref.beast__error_code `error_code&`]. [table Writer requirements [[expression] [type] [semantics, pre/post-conditions]] diff --git a/doc/concept/Fields.qbk b/doc/concept/Fields.qbk index 8ef49c48..414d99b7 100644 --- a/doc/concept/Fields.qbk +++ b/doc/concept/Fields.qbk @@ -23,7 +23,7 @@ In this table: * `c` denotes a (possibly const) value of type `X`. -* `s` is a value of type [link beast.ref.string_view `string_view`]. +* `s` is a value of type [link beast.ref.beast__string_view `string_view`]. [table Fields requirements [[expression][type][semantics, pre/post-conditions]] diff --git a/doc/concept/FieldsReader.qbk b/doc/concept/FieldsReader.qbk index a6486313..769d2e6d 100644 --- a/doc/concept/FieldsReader.qbk +++ b/doc/concept/FieldsReader.qbk @@ -27,7 +27,7 @@ In this table: * `c` is an integer representing the HTTP status-code. -* `m` is a value of type [link beast.ref.http__verb `verb`]. +* `m` is a value of type [link beast.ref.beast__http__verb `verb`]. [table FieldsReader requirements [[expression][type][semantics, pre/post-conditions]] diff --git a/doc/makeqbk.sh b/doc/makeqbk.sh index 07b2b694..b742a28b 100755 --- a/doc/makeqbk.sh +++ b/doc/makeqbk.sh @@ -5,9 +5,12 @@ # 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) -mkdir -p ../bin/doc/xml +mkdir -p temp doxygen source.dox -cd ../bin/doc/xml +cd temp xsltproc combine.xslt index.xml > all.xml -cd ../../../doc -xsltproc reference.xsl ../bin/doc/xml/all.xml > reference.qbk +cp ../docca/include/docca/doxygen.xsl doxygen.xsl +sed -i -e '//{r ../xsl/class_detail.xsl' -e 'd}' doxygen.xsl +sed -i -e '//{r ../xsl/includes.xsl' -e 'd}' doxygen.xsl +sed -i -e '//{r ../xsl/includes_foot.xsl' -e 'd}' doxygen.xsl +xsltproc ../xsl/reference.xsl all.xml > ../reference.qbk diff --git a/doc/quickref.xml b/doc/quickref.xml index c7118174..04edf9d5 100644 --- a/doc/quickref.xml +++ b/doc/quickref.xml @@ -29,73 +29,73 @@ Classes - basic_dynamic_body - basic_fields - basic_parser - buffer_body - dynamic_body - empty_body - fields - header - message - parser - no_chunk_decorator - request - request_parser - response - response_parser - serializer - string_body - string_view_body + basic_dynamic_body + basic_fields + basic_parser + buffer_body + dynamic_body + empty_body + fields + header + message + parser + no_chunk_decorator + request + request_parser + response + response_parser + serializer + string_body + string_view_body rfc7230 - ext_list - opt_token_list - param_list - token_list + ext_list + opt_token_list + param_list + token_list Functions - async_read - async_read_header - async_read_some - async_write - async_write_header - async_write_some - int_to_status - make_serializer - obsolete_reason - operator<< - read - read_header - read_some - string_to_field - string_to_verb - swap - to_string - to_status_class - write - write_header - write_some + async_read + async_read_header + async_read_some + async_write + async_write_header + async_write_some + int_to_status + make_serializer + obsolete_reason + operator<< + read + read_header + read_some + string_to_field + string_to_verb + swap + to_string + to_status_class + write + write_header + write_some Constants - error - field - status - status_class - verb + error + field + status + status_class + verb Type Traits - is_body - is_body_writer - is_body_reader + is_body + is_body_writer + is_body_reader Concepts @@ -109,26 +109,26 @@ Classes - close_reason - ping_data - stream - reason_string - teardown_tag + close_reason + ping_data + stream + reason_string + teardown_tag Functions - async_teardown - is_upgrade - teardown + async_teardown + is_upgrade + teardown Options - permessage_deflate + permessage_deflate Constants - close_code - error + close_code + error @@ -155,66 +155,66 @@ Classes - async_completion - async_result - async_return_type - basic_flat_buffer - basic_multi_buffer - buffer_cat_view - buffer_prefix_view - buffered_read_stream - buffers_adapter - consuming_buffers - drain_buffer - error_category - error_code - error_condition - flat_buffer - handler_alloc - handler_ptr - handler_type - multi_buffer - static_buffer - static_buffer_n - static_string - string_param - string_view - system_error + async_completion + async_result + async_return_type + basic_flat_buffer + basic_multi_buffer + buffer_cat_view + buffer_prefix_view + buffered_read_stream + buffers_adapter + consuming_buffers + drain_buffer + error_category + error_code + error_condition + flat_buffer + handler_alloc + handler_ptr + handler_type + multi_buffer + static_buffer + static_buffer_n + static_string + string_param + string_view + system_error Functions - bind_handler - buffer_cat - buffer_prefix - buffers - ostream - read_size - read_size_or_throw - system_category - to_static_string + bind_handler + buffer_cat + buffer_prefix + buffers + ostream + read_size + read_size_or_throw + system_category + to_static_string Constants - errc + errc Type Traits - get_lowest_layer - has_get_io_service - is_async_read_stream - is_async_write_stream - is_async_stream - is_completion_handler - is_const_buffer_sequence - is_dynamic_buffer - is_mutable_buffer_sequence - is_sync_read_stream - is_sync_stream - is_sync_write_stream + get_lowest_layer + has_get_io_service + is_async_read_stream + is_async_write_stream + is_async_stream + is_completion_handler + is_const_buffer_sequence + is_dynamic_buffer + is_mutable_buffer_sequence + is_sync_read_stream + is_sync_stream + is_sync_write_stream @@ -230,19 +230,19 @@ Classes - deflate_stream - inflate_stream - z_params + deflate_stream + inflate_stream + z_params Functions - deflate_upper_bound + deflate_upper_bound Constants - error - Flush - Strategy + error + Flush + Strategy @@ -261,8 +261,8 @@ - doc_debug - nested_doc_debug + doc_debug + nested_doc_debug diff --git a/doc/reference.xsl b/doc/reference.xsl deleted file mode 100644 index b82318df..00000000 --- a/doc/reference.xsl +++ /dev/null @@ -1,1866 +0,0 @@ - - - - - - - - - - - - - - - - - -[/ - Copyright (c) 2013-2017 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) -] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * - - - - & - - - - &... - - - - && - - - - &&... - - - - - - - - - - - - - - - - - - - - - - - - - - - ``['implementation-defined]`` - - - __void_or_deduced__ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [heading - - ] - - - - - [@ - - - - ] - - - - - - - - - - - - - `` - - - - - - `` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ` - - ` - - - - ` - - ` - - - - - - - - - - - - - - - - - - - - - # - - - * - - - - - -[*] - -['] - - - - - [heading Parameters] - - - [heading Exceptions] - - - [variablelist - - ] - - - - [[ - - ][ - - ]] - - - - - [table - - ] - - - - [ - - ] - - - - [ - - ] - - - - - - - - [heading Return Value] - - - - [heading See Also] - - - - [heading Remarks] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \_ - - - - - - - - - - - - - - - - - \[ - - - - - - - \] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [link beast.ref. - - ` - - `] - - - [role red |1| - - ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [link beast.ref. - - - - - - - - - ` - - `] - - - [link beast.ref. - - ` - - `] - - - [role red - - ] - - - - - [role red - - ] - - - - - - - - - [role red |3| - - ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [link beast.ref. - - - - - - - - - ` - - `] - - - [link beast.ref. - - ` - - `] - - - [role red - - ] - - - - - [role red - - ] - - - - - - - - - - [heading Requirements] - ['Header: ][^ - - ] - - - ['Convenience header: ][^beast/core.hpp] - - - ['Convenience header: ][^beast/http.hpp] - - - ['Convenience header: ][^beast/websocket.hpp] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [section: - - - - ] - - ``` - - - - - - : - - - - - - public - - - - - - , - - - - ``` - - - - - - - - - - - - - -[endsect] - - - - - - - [heading Types] - [table [[Name][Description]] - - - [ - - - [[link beast.ref. - - . - - [* - - ]]] [ - - - - ] - - - - - - - - - - - - - - - - - - - [[link beast.ref. - - [* - - ]]] [ - - ] - - - ] - - ] - - - [heading Member Functions] - [table [[Name][Description]] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [ - [[link beast.ref. - . - [* - - ]]] [ - - - - - - - - ] ] - - - ] - - - [heading Protected Member Functions] - [table [[Name][Description]] - - - - - - - - - - - - - - - - - - - - - - - - - [ - [[link beast.ref. - . - [* - - ]]] [ - - - - - - - - ] ] - - - ] - - - [heading Private Member Functions] - [table [[Name][Description]] - - - - - - - - - - - - - - - - - - - - - - - - - [ - [[link beast.ref. - . - [* - - ]]] [ - - - - - - - - ] ] - - - ] - - - [heading Static Data Members] - [table [[Name][Description]] - - - [ - [[link beast.ref. - . - [* - - ]]] [ - - ] ] - - ] - - - [heading Data Members] - [table [[Name][Description]] - - - [ - [[link beast.ref. - . - [* - - ]]] [ - - ] ] - - ] - - - [heading Protected Data Members] - [table [[Name][Description]] - - - [ - [[link beast.ref. - . - [* - - ]]] [ - - ] ] - - ] - - - [heading Private Data Members] - [table [[Name][Description]] - - - [ - [[link beast.ref. - . - [* - - ]]] [ - - ] ] - - ] - - - [heading Friends] - [table [[Name][Description]] - - - - - - - - - - - - - - - - - - - - - - - - - [ - [[link beast.ref. - . - [* - - ]]] [ - - - - - - - - ] ] - - - ] - - - [heading Related Functions] - [table [[Name][Description]] - - - - - - - - - - - - - - - - - - - - - - - - - [ - [[link beast.ref.. - [*]]] - [ - - - - - - - - - ] - ] - - - - ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [section: - - - - :: - - ] - [indexterm2 - - .. - - ] - - ``` - - - - - ``` - - ``` - - - - explicit - friend - static - virtual - - - - - - - - - - ``[link beast.ref. - - . - - .overload - - - - ]``( - - ) - - const - - ; - - ``` - - - - - [section: - - - - - overload - - - - - :: - - - ( - - of - - overloads) - - ] - - - - ['Inherited from - - - - .] - - - - [indexterm2 - - .. - - ] - - - - - - - - - - - - - - - - - - ``` - - ``` - - - ``` - - ``` - - - - - - - - - - - [endsect] [endsect] - - - [endsect] - - - - - - - - - ``` using - - = - - - - - - - - - ; ``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ``` - - static - - - - - - - - - ; ``` - - - - - - - ``` - enum - - ``` - - - - [indexterm2 - - .. - - ] - - - [heading Values] - [variablelist - - [[ - - ] [ - - ]] - - ] - - - - - - - - - - - - - - - - - - - - - - - static - virtual - - - - - - ( - - ) - const - ; - - - - - - template< - - > - - - - - - - - - class ``[link beast.concept.streams.AsyncStream [*AsyncStream]]`` - - - class __AsyncReadStream__ - - - class __AsyncWriteStream__ - - - class ``[link beast.concept.Body [*Body]]`` - - - class ``[link beast.concept.BufferSequence [*BufferSequence]]`` - - - - ``[link beast.concept.BufferSequence [*BufferSequence]]`` - - - class __CompletionHandler__ - - - class __ConstBufferSequence__ - - - class ``[link beast.concept.DynamicBuffer [*DynamicBuffer]]`` - - - class __Handler__ - - - class __MutableBufferSequence__ - - - class ``[link beast.concept.streams.Stream [*Stream]]`` - - - class ``[link beast.concept.streams.SyncStream [*SyncStream]]`` - - - class __SyncReadStream__ - - - class __SyncWriteStream__ - - - - - - - - - - - - - - - - - - - - - - - = - - - - , - - - - - - - - - (& - - ) - - - - - - - - - - - - - - = - - - - , - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [section: - - - - ] - [indexterm1 - - ] - - - - - - - - - - - ``` - - - - - ``` - - ``` - - - - - - - - - - - - - ``[link beast.ref. - - .overload - - - - ]``( - - ); - - ``` - - - - - - - - - [section: - - - - [section: - overload - - - - - - ( - - of - - overloads) - - ] - - [indexterm1 - - ] - - - - - - - - - - - - - - - - - - ``` - - ``` - - - - - - - - - - - [endsect] [endsect] - - - [endsect] - - - - - diff --git a/doc/source.dox b/doc/source.dox index ab9b8a49..905811e4 100644 --- a/doc/source.dox +++ b/doc/source.dox @@ -16,7 +16,7 @@ ABBREVIATE_BRIEF = ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = YES FULL_PATH_NAMES = NO -STRIP_FROM_PATH = +STRIP_FROM_PATH = ../include/ STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES @@ -254,7 +254,7 @@ MAN_LINKS = NO # Configuration options related to the XML output #--------------------------------------------------------------------------- GENERATE_XML = YES -XML_OUTPUT = ../bin/doc/xml +XML_OUTPUT = temp/ XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- diff --git a/doc/xsl/class_detail.xsl b/doc/xsl/class_detail.xsl new file mode 100644 index 00000000..7103a4ff --- /dev/null +++ b/doc/xsl/class_detail.xsl @@ -0,0 +1,48 @@ + + + class ``[link beast.concept.streams.AsyncStream [*AsyncStream]]`` + + + class __AsyncReadStream__ + + + class __AsyncWriteStream__ + + + class ``[link beast.concept.Body [*Body]]`` + + + class ``[link beast.concept.BufferSequence [*BufferSequence]]`` + + + + ``[link beast.concept.BufferSequence [*BufferSequence]]`` + + + class __CompletionHandler__ + + + class __ConstBufferSequence__ + + + class ``[link beast.concept.DynamicBuffer [*DynamicBuffer]]`` + + + class __Handler__ + + + class __MutableBufferSequence__ + + + class ``[link beast.concept.streams.Stream [*Stream]]`` + + + class ``[link beast.concept.streams.SyncStream [*SyncStream]]`` + + + class __SyncReadStream__ + + + class __SyncWriteStream__ + + diff --git a/doc/xsl/includes.xsl b/doc/xsl/includes.xsl new file mode 100644 index 00000000..6f48e5fe --- /dev/null +++ b/doc/xsl/includes.xsl @@ -0,0 +1,5 @@ + + Defined in header [include_file + + ] + diff --git a/doc/xsl/includes_foot.xsl b/doc/xsl/includes_foot.xsl new file mode 100644 index 00000000..ba723c06 --- /dev/null +++ b/doc/xsl/includes_foot.xsl @@ -0,0 +1,16 @@ + + + + Convenience header [include_file beast/core.hpp] + + + Convenience header [include_file beast/http.hpp] + + + Convenience header [include_file beast/websocket.hpp] + + + Convenience header [include_file beast/zlib.hpp] + + + diff --git a/doc/xsl/reference.xsl b/doc/xsl/reference.xsl new file mode 100644 index 00000000..90a7c0e8 --- /dev/null +++ b/doc/xsl/reference.xsl @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/examples/doc_core_samples.hpp b/examples/doc_core_samples.hpp index 8fcd8d69..7f6449e1 100644 --- a/examples/doc_core_samples.hpp +++ b/examples/doc_core_samples.hpp @@ -218,7 +218,7 @@ template< class AsyncReadStream, class DynamicBuffer, class CompletionToken> -async_return_type< /*< The [link beast.ref.async_return_type `async_return_type`] customizes the return value based on the completion token >*/ +async_return_type< /*< The [link beast.ref.beast__async_return_type `async_return_type`] customizes the return value based on the completion token >*/ CompletionToken, void(error_code, boost::tribool)> /*< This is the signature for the completion handler >*/ async_detect_ssl( diff --git a/examples/echo_op.cpp b/examples/echo_op.cpp index 56bc3268..95cfffb8 100644 --- a/examples/echo_op.cpp +++ b/examples/echo_op.cpp @@ -52,7 +52,7 @@ template< class AsyncStream, class CompletionToken> -beast::async_return_type< /*< The [link beast.ref.async_return_type `async_return_type`] customizes the return value based on the completion token >*/ +beast::async_return_type< /*< The [link beast.ref.beast__async_return_type `async_return_type`] customizes the return value based on the completion token >*/ CompletionToken, void(beast::error_code)> /*< This is the signature for the completion handler >*/ async_echo( diff --git a/include/beast/core/flat_buffer.hpp b/include/beast/core/flat_buffer.hpp index fc2f5a64..3d19b71d 100644 --- a/include/beast/core/flat_buffer.hpp +++ b/include/beast/core/flat_buffer.hpp @@ -293,6 +293,7 @@ public: void shrink_to_fit(); + /// Exchange two flat buffers template friend void diff --git a/include/beast/http/fields.hpp b/include/beast/http/fields.hpp index 9843c9c9..ff98d160 100644 --- a/include/beast/http/fields.hpp +++ b/include/beast/http/fields.hpp @@ -41,6 +41,9 @@ namespace http { of the field name. Meets the requirements of @b Fields + + @tparam Allocator The allocator to use. This must meet the + requirements of @b Allocator. */ template class basic_fields @@ -138,6 +141,7 @@ private: boost::intrusive::constant_time_size, boost::intrusive::compare>::type; + protected: friend class fields_test; // for `header` @@ -263,7 +267,7 @@ public: string_view operator[](field name) const; - /** Returns the value for a case-insensitive matching header, or `""`. + /** Returns the value for a case-insensitive matching header, or `""` if it does not exist. If more than one field with the specified name exists, the first field defined by insertion order is returned. diff --git a/include/beast/http/message.hpp b/include/beast/http/message.hpp index c9afaeff..f59095c6 100644 --- a/include/beast/http/message.hpp +++ b/include/beast/http/message.hpp @@ -503,7 +503,7 @@ struct message : header The value of the Content-Length field will be unconditionally set to the specified number of octets. - @par n The number of octets to set for the Content-Length field. + @param n The number of octets to set for the Content-Length field. */ void content_length(std::uint64_t n);