Commit Graph

458 Commits

Author SHA1 Message Date
Vinnie Falco
726118468b Add asio_handler_invoke overloads for stream algorithms:
fix #1012

This fixes a bug where asynchronous stream alogrithms do not
work correctly with the legacy `io_service::strand` implementation.
2018-03-01 08:31:57 -08:00
Vinnie Falco
04ced3b954 Examples clear the HTTP message before reading
fix #1043
2018-02-27 08:12:54 -08:00
Vinnie Falco
5d5e58c5b4 Some basic_fields operations now give the strong exception guarantee 2018-02-26 17:09:47 -08:00
Vinnie Falco
9f094518bc Safe treatment of zero-length string arguments in basic_fields:
This fixes a broken memcpy precondition when empty strings are
passed as arguments to basic_fields member functions.
2018-02-26 17:09:20 -08:00
Vinnie Falco
a8a5fa9f6c Fix typo in release notes 2018-02-26 17:09:01 -08:00
Vinnie Falco
eae74b1c89 get_lowest_layer is a type alias:
fix #941, fix #1016

`get_lowest_layer` is now a type alias for the
lowest layer instead of a struct with a nested type.

Actions required:

* Replace instances of `typename get_lowest_layer<T>::type`
  with `get_lowest_layer<T>`.
2018-02-21 14:49:44 -08:00
Vinnie Falco
66f0814cfd Tidy up some documentation
fix #984
2018-02-21 13:58:43 -08:00
Vinnie Falco
d79950d95c DynamicBuffer input areas are not mutable
fix #1014
2018-02-21 13:19:14 -08:00
Vinnie Falco
10ce0283c2 Advanced servers support clean shutdown via SIGINT or SIGTERM
fix #1026
2018-02-21 12:44:11 -08:00
Vinnie Falco
a4714746dc Examples set reuse_address(true)
fix #1027
2018-02-21 12:35:07 -08:00
Vinnie Falco
490b9ce893 Tidy up websocket docs
fix #1035
2018-02-21 12:10:26 -08:00
Vinnie Falco
c505e32210 Fix big-endian websocket masking
fix #1030
2018-02-21 06:35:32 -08:00
Vinnie Falco
593ccb15cd Fix teardown for TIME_WAIT
fix #1024, fix #1029
2018-02-20 04:33:43 -08:00
Vinnie Falco
1b56105350 Update docca subtree:
Merge commit 'ad4d852e7bcf2edea0ef211f4a4fcb67a2c0795f' into v156
2018-02-19 18:36:44 -08:00
Vinnie Falco
b249d6f868 Fix stale link for void-or-deduced 2018-02-19 18:36:31 -08:00
Vinnie Falco
b68db30ba6 Add release notes to documentation 2018-02-19 18:36:31 -08:00
Vinnie Falco
38e580e49d Add Bishop Fox interview media 2018-01-25 06:02:43 -08:00
Vinnie Falco
cc43b46c42 Refactor WebSocket errors (API Change):
fix #949

* New error codes are introduced for WebSocket failures

* More verbose messages for error codes

* Error codes are mapped to conditions for ease of testing

* error::failed and error::handshake_failed are deprecated (don't use)

Actions Required:

* Code which explicitly compares error_code values against the
  constant `websocket::error::handshake_failed` should compare
  against `websocket::condition::handshake_failed` instead.

* Code which explicitly compares error_code values against the
  constant `websocket::error::failed` should compare
  against `websocket::condition::protocol_violation` instead.
2018-01-12 07:35:26 -08:00
Vinnie Falco
841ab8474b permessage-deflate is a compile-time feature (API Change):
fix #849

This adds an additional `bool` template parameter to
`websocket::stream`:

* When deflateSupported is `true`, the stream will be capable
  of negotiating the permessage-deflate websocket extension per
  the configured run-time settings.

* When deflateSupported is `false`, the stream will never negotiate
  the permessage-deflate websocket extension. Furthermore, all of the
  code necessary for implementing the permessage-deflate extension
  will be excluded from function instantiations. The resulting emitted
  object code should be smaller.
2017-12-30 13:23:41 -08:00
Vinnie Falco
4a4d535d98 Documentation 2017-12-15 09:27:40 -08:00
Damian Jarek
b76ab4450a New BodyReader and BodyWriter constructors (API Change):
fix #884

* BodyReader and BodyWriter constructors now require the header and
  body elements to be passed as distinct header and value_type objects.

This enables the composition of body types, for example:

    http::response<compressed_body<http::string_body>> res;

* The previous single-argument constructors are deprecated and will be
  removed in a subsequent version.

Actions Required:

* Change user-defined instances of BodyReader or BodyWriter constructor
  signatures to the two-argument form.

OR

* Define the macro BOOST_BEAST_ALLOW_DEPRECATED in the project (which
  will accept both the new and the deprecated signatures).
2017-12-15 09:27:39 -08:00
Vinnie Falco
1b86bc3c36 Update reports for hybrid assessment 2017-12-04 12:05:27 -08:00
p-kalugin
fb0d82245f Fix typo in examples documentation 2017-11-26 09:55:38 -08:00
Vinnie Falco
9d941f2655 Documentation tidying 2017-11-22 10:29:19 -08:00
Vinnie Falco
a4a2ee8806 Fix autobahn report link 2017-11-13 12:18:30 -08:00
Vinnie Falco
afca4cc277 Warn about upcoming API changes to certain concepts 2017-11-11 09:13:05 -08:00
Vinnie Falco
fdd02d9ee7 Tidy up some documented constructor syntax 2017-11-03 19:41:34 -07:00
Vinnie Falco
327ebc2007 Add FieldsWriter constructor requirement
fix #864
2017-11-03 19:36:35 -07:00
Vinnie Falco
14926bfb3f
Tidy up message doc image 2017-11-02 15:52:57 -07:00
Vinnie Falco
895c9fa7ed BodyReader and BodyWriter names are swapped (API Change):
Body::reader and Body::writer meanings are reversed, for
consistency with the names of the stream operations:

* Body::reader is used for read, read_some, async_read, async_read_some
* Body::writer is used for write, write_some, async_write, async_write_some

Actions Required:

* Swap the reader and writer names for user defined Body types
* Swap use of is_body_reader and is_body_writer
2017-10-30 18:13:40 -07:00
Vinnie Falco
101023553e Fields::writer replaces Fields::reader (API Change):
* Fields::writer replaces Fields::reader
* The FieldsWriter concept is renamed from FieldsReader

Actions Required:

* Rename reader to writer for user defined Fields
2017-10-30 17:53:59 -07:00
Vinnie Falco
14653be0cc Tidy up FieldsReader doc 2017-10-30 15:59:05 -07:00
Vinnie Falco
23bf8638ab Add ref-qualified overloads for message::body 2017-10-30 15:23:43 -07:00
Vinnie Falco
b5389ba5f2 Documentation tidying
fix #836
2017-10-27 11:16:09 -07:00
Vinnie Falco
c3367e0746 Add autobahn test report to doc 2017-10-26 11:08:24 -07:00
Vinnie Falco
6225c5bd2f Add has_content_length_impl to Fields (API Change):
* The function has_content_length_impl is added to the
  requirements of Fields.

Actions Required:

* Implement has_content_length_impl for user-defined Fields
2017-10-25 17:58:45 -07:00
Vinnie Falco
93c849d6d4 Update doc links 2017-10-25 17:08:48 -07:00
Vinnie Falco
1faac0b0fb Update stream write documentation for end of stream changes 2017-10-23 18:36:01 -07:00
Vinnie Falco
3a28e999af Update for Net-TS Asio (API Change):
fix #769

The following classes are removed:

* handler_type
* async_result
* async_completion
* is_dynamic_buffer
* is_const_buffer_sequence
* is_mutable_buffer_sequence
* handler_alloc

Actions Required:

* Use BOOST_ASIO_HANDLER_TYPE instead of handler_type
* Use BOOST_ASIO_INITFN_RESULT_TYPE instead of async_result
* Use boost::asio::async_completion
* Use boost::asio::is_dynamic_buffer
* Use boost::asio::is_const_buffer_sequence
* Use boost::asio::is_mutable_buffer_sequence
* boost::asio::associated_allocator_t replaces handler_alloc
2017-10-23 17:11:27 -07:00
Vinnie Falco
ac6c23dd6b Doc root is at index.html
fix #795
2017-09-26 10:03:46 -07:00
Vinnie Falco
b5f22bdef6 Add buffers_to_string
fix #772
2017-09-20 08:31:36 -07:00
Vinnie Falco
06fb2b9dfc buffers_cat replaces buffer_cat (API Change):
fix #773

* buffer_cat is renamed to buffers_cat
* buffer_cat_view is renamed to buffers_cat_view

Actions Required:

* Use buffers_cat instead of buffer_cat
* Use buffers_cat_view instead of buffer_cat_view
2017-09-15 12:52:59 -07:00
Vinnie Falco
38c2816539 buffers_front replaces buffer_front (API Change):
fix #773

* buffer_front is renamed to buffer_front

Actions Required:

* Use buffers_front instead of buffer_front
2017-09-15 12:52:59 -07:00
Vinnie Falco
e94a65b04a buffers_prefix replaces buffer_prefix (API Change)
fix #773

* buffer_prefix is renamed to buffers_prefix
* buffer_prefix_view is renamed to buffers_prefix_view

Actions Required:

* Use buffers_prefix instead of buffer_prefix
* Use buffers_prefix_view instead of buffer_prefix_view
2017-09-15 12:52:58 -07:00
Vinnie Falco
795da80859 buffers_suffix replaces consuming_buffers (API Change):
fix #770

* consuming_buffers is renamed to buffers_suffix

Actions Required:

* Use buffers_suffix instead of consuming_buffers
2017-09-15 12:52:45 -07:00
Vinnie Falco
38e28966ea message::version is a member function (API Change):
fix #778

* The version data member is replaced with accessor
  member functions.

Actions Required:

* Call member function message::version instead of accessing
  the version member at call sites.
2017-09-12 17:13:02 -07:00
Vinnie Falco
49d9d47a0b HTTP reads and writes return bytes transferred (API Change):
* HTTP read and write operations now return the
  number of bytes transferred to or from the stream.

Actions Required:

* Modify HTTP read and/or write completion handlers to receive
  the extra std::size_t bytes_transferred parameter.
2017-09-03 20:37:28 -07:00
Vinnie Falco
cc8246e27e Update websocket notes 2017-09-03 20:05:20 -07:00
Vinnie Falco
a73b6474e9 Add doc read and write handler class details 2017-09-03 20:05:20 -07:00
Vinnie Falco
0b83eb8e1e Add file to documentation 2017-08-23 12:02:32 -07:00
Vinnie Falco
59d4b85e15 Don't use async_write_msg in examples
fix #746
2017-08-18 07:55:30 -07:00
Vinnie Falco
76feb4afd4 Fix for basic_parser::skip(true) and docs
fix #742
2017-08-15 07:00:56 -07:00
Vinnie Falco
6f85f38836 Section headings in examples 2017-08-08 06:20:24 -07:00
Vinnie Falco
dd71b0f94d Refactor all examples:
fix #575, fix #604, fix #608, fix #634, fix #712

All examples are rewritten:

* Using Best Practices
* Mostly self-contained
* New examples to complete the feature matrix
* The server-framework example is removed
2017-08-07 20:53:11 -07:00
Vinnie Falco
5e6ee5445e websocket documentation 2017-08-04 19:02:13 -07:00
Vinnie Falco
60c8a560bf Add teardown_role for correct TIME_WAIT behavior (API Change):
* teardown_tag is replaced with teardown_role, a client/server
  flag used to determine whether the shutdown is performed
  before or after reading the EOF. This is in accordance with
  RFC6455 7.1.1:

  https://tools.ietf.org/html/rfc6455#section-7.1.1

Actions Required:

* Modify signatures of teardown and async_teardown to use
  teardown_role instead of teardown_tag

* Change calls to teardown and async_teardown to pass the
  correct role: client or server depending on context.
2017-08-04 19:02:13 -07:00
Vinnie Falco
de03a1a32d drain_buffer is removed (API Change):
* The drain_buffer dynamic buffer is no longer a public interface.

Actions Required:

* Replace code which uses drain_buffer. For websocket::stream,
  it is no longer necessary to manually drain the connection
  after closing.
2017-08-04 19:02:13 -07:00
Vinnie Falco
338374a37f Don't output LIB_DIR 2017-08-03 08:59:46 -07:00
Vinnie Falco
c495f946c9 Fix doc includes 2017-08-03 08:53:12 -07:00
Vinnie Falco
69c9ec5d9f Fix doc convenience includes 2017-08-03 07:47:49 -07:00
Vinnie Falco
3f26cc98de Show LIB_DIR (debug) 2017-08-03 05:15:43 -07:00
Nik Bougalis
db92ec9127 Fix doc typo 2017-08-03 04:22:08 -07:00
Vinnie Falco
1f0ad880fc Fix LIB_DIR for Windows 2017-08-02 19:17:35 -07:00
Rene Rivera
852d2b487e Fix LIB_DIR calculation. 2017-08-02 19:09:03 -07:00
Vinnie Falco
5460b8618c Use LIB_DIR in text output (debug) 2017-08-02 09:19:19 -07:00
Vinnie Falco
e21d251e6c Use correct var in doc Jamfile 2017-08-02 07:36:23 -07:00
Vinnie Falco
6a0b57ed4c Log on Linux not Windows 2017-08-01 20:45:53 -07:00
Vinnie Falco
7e1ade4169 Log the value of LIB_DIR for doc builds (debug) 2017-08-01 12:41:36 -07:00
Vinnie Falco
8bfa058daa Tidy up doc snippet paths 2017-07-29 12:44:41 -07:00
Vinnie Falco
61b2b63b57 Update doc copyrights 2017-07-29 00:25:00 -07:00
Vinnie Falco
8bf86bd2fa Build stand-alone doc 2017-07-29 00:25:00 -07:00
Vinnie Falco
b2d58d60f9 Fix doc title 2017-07-28 19:30:28 -07:00
Vinnie Falco
ddd67ef30e source.dox is path-independent 2017-07-28 17:07:23 -07:00
Vinnie Falco
c28a700a00 Output to integrated documentation 2017-07-28 16:27:08 -07:00
Peter Dimov
31d2718eac Use configured doxygen and xsltproc 2017-07-25 05:33:28 -07:00
Vinnie Falco
03ec8d4d4b Normalize doc build scripts 2017-07-25 05:33:27 -07:00
Vinnie Falco
f084d1e7b8 Add config-template 2017-07-24 10:40:57 -07:00
Vinnie Falco
982f4c3b70 Update documentation for boost 2017-07-24 09:41:27 -07:00
Vinnie Falco
a72839645d Update README.md 2017-07-23 17:36:31 -07:00
Vinnie Falco
cb501a07c8 WebSocket optimizations (API Change):
The websocket stream is optimized to contain a small
circular static buffer, reducing the number of I/O calls when
reading data. The size of the buffer is tuned for maximum
performance with TCP/IP and no long needs configuration:

* read_some replaces read_frame
* write_some replaces write_Frame
* async_read_some replaces async_read_frame
* async_write_some replaces async_write_frame

* websocket::stream::read_buffer_size is removed

Actions Required:

* Remove calls websocket::stream::read_buffer_size

* Use read_some and write_some instead of read_frame and write_frame
2017-07-20 08:15:32 -07:00
Vinnie Falco
04887c49e0 Documentation work 2017-07-20 08:15:32 -07:00
Vinnie Falco
4e44ddbd45 Add static_buffer (API Change):
* static_buffer is added

Note this is the same name from two versions ago, when
static_buffer was renamed to flat_static_buffer for
consistency and to clear the name for a circular static
buffer.

Actions Required:

* Callers who depend on static_buffer returning sequences of
  exactly length one should switch to flat_static_buffer.
2017-07-20 08:15:32 -07:00
Vinnie Falco
cee3bff060 Add buffer_front 2017-07-20 08:15:32 -07:00
Vinnie Falco
94e92e75b7 Rename to flat_static_buffer and flat_static_buffer_base (API Change):
Actions Required:

* Rename static_buffer to flat_static_buffer_base
* Rename static_buffer_n to flat_static_buffer
2017-07-20 08:15:31 -07:00
Vinnie Falco
4b71aa67e0 Refactor chunked parsing (API Change):
* parser now has a callback feature for intercepting chunk headers
  and chunk bodies

* The names for basic_parser derived class callbacks have been
  refactored

* basic_parser offers an additional callback for distinguishing
  chunk body data.

Actions Required:

* Adjust signatures for required members of user-defined
  subclasses of basic_parser

* Use the new basic_parser chunk callbacks for accessing
  chunk extensions and chunk bodies.
2017-07-20 08:15:31 -07:00
Vinnie Falco
ff15cf8688 Refactor chunked-encoding serialization:
New buffer sequence classes are provided to allow full
control over the serialization of chunk-encoded message
payloads:

* chunk_header

    A ConstBufferSequence representing the chunk header.
    It includes a hexadecimal-encoded size, an optional
    set of chunk extensions, and the trailing CRLF
    required to denote the end of the chunk header.

    This allows the caller to manually serialize the chunk
    body in one or more calls to a stream output function.
    The caller must also output an object of type `chunk_crlf`
    to the stream to indicate the end of the chunk body.

* chunk_crlf

    A small ConstBufferSequence that simply represents
    the two character sequence "\r\n" (CRLF). This is needed
    for the case where the caller wants to output a chunk
    body as a series of buffers (i.e. "chunking a chunk").

* chunk_body

    A ConstBufferSequence representing a complete chunk.
    This includes the size, an optional set of chunk extensions,
    a caller provided buffer containing the body, and the
    required CRLF that follows.

* chunk_final

    A ConstBufferSequence representing a final chunk. It
    includes an optional set of caller-provided field trailers

* chunk_extensions

    A container for building a set of chunk extensions to use
    during serialization. The use of the container is optional,
    callers may provide their own buffer containing a correctly
    formatted set of chunk extensions, or they may use their
    own convenience container which meets the requirements.

The basic_fields container is modified to allow construction
outside the context of a message. The container can be used
to provide trailers to `chunk_final`.

Actions Required:

* Remove references to ChunkDecorators. Use the new chunk-encoding
  buffer sequences to manually produce a chunked payload body in
  the case where control over the chunk-extensions and/or trailers
  is required.
2017-07-20 08:15:31 -07:00
Vinnie Falco
6cec63fc9e Add basic_file_body.hpp 2017-07-20 08:15:31 -07:00
Vinnie Falco
b65f0abd50 Javadoc tidying 2017-07-20 08:15:30 -07:00
Vinnie Falco
5788ed2574 Remove string_view_body
Actions Required:

* Use span_body<char> instead of string_view_body
2017-07-20 08:15:30 -07:00
Vinnie Falco
fa45e6ad07 Tidy up FieldsReader doc 2017-07-20 08:15:30 -07:00
Vinnie Falco
6a46e48424 Add message keep_alive, chunked, content_length members 2017-07-20 08:15:30 -07:00
Vinnie Falco
f34d4f7204 span, string, vector bodies are public 2017-07-20 08:15:30 -07:00
Vinnie Falco
1f41c124c0 Documentation work 2017-07-20 08:15:30 -07:00
Vinnie Falco
37110f2d04 Add span_body 2017-07-20 08:15:30 -07:00
Vinnie Falco
80eb5af584 Add span 2017-07-20 08:15:30 -07:00
Vinnie Falco
e1de01ad13 Add vector_body
fix #580
2017-07-20 08:15:30 -07:00
Vinnie Falco
c6d7fa185b Tidy up basic_string_body
fix #580
2017-07-20 08:15:30 -07:00
Vinnie Falco
e06a055503 BodyReader, BodyWriter use two-phase init (API Change):
These types now perform error-based initialization in
a separate init() functions instead of in the constructor.

Actions Required:

* Modify instances of user-defined BodyReader and BodyWriter
  types to perfrom two-phase initialization, as per the
  updated documented type requirements.
2017-07-20 08:15:30 -07:00
Vinnie Falco
db59a92011 BodyReader may construct from a non-const message
fix #619
2017-07-20 08:15:30 -07:00
Vinnie Falco
eec5f1d8b6 Add file_posix 2017-07-20 08:15:30 -07:00
Vinnie Falco
e81026614a Remove common/file_body.hpp 2017-07-20 08:15:30 -07:00
Vinnie Falco
8bf46ffa05 Add file_body 2017-07-20 08:15:30 -07:00
Vinnie Falco
7254cc8976 Add file_win32 2017-07-20 08:15:30 -07:00
Vinnie Falco
ddc3099281 Add file_stdio and File concept 2017-07-20 08:15:30 -07:00
Vinnie Falco
f5ae60613f serializer::next replaces serializer::get (API Change):
Actions Required:

* Use serializer::next instead of serializer::get at call sites
2017-07-20 08:15:29 -07:00
Vinnie Falco
6b6c2e0f93 Add websocket-server-async example 2017-07-20 08:15:29 -07:00
Vinnie Falco
c12ded9abc Add http-server-threaded example 2017-07-20 08:15:29 -07:00
Vinnie Falco
09df24ec62 Refactor file_body for best practices 2017-07-20 08:15:29 -07:00
Vinnie Falco
ff33783d11 Refine Body::size specification 2017-07-20 08:15:29 -07:00
Vinnie Falco
c149321013 Return std::size_t from Body::writer::put (API Change)
`put` returns the number of bytes actually transferred
from the input buffers.

Actions Required:

* Return the number of bytes actually transferred from the
  input buffers in user defined `Body::writer::put` functions.
2017-07-20 08:15:29 -07:00
Zach Laine
48929c4b3c std::pair "last" -> "first" in http_message.qbk
fix #563
2017-07-20 08:15:29 -07:00
Zach Laine
4f5f6a46fa Fix can/cannot thinko in FAQ.
fix #562
2017-07-20 08:15:29 -07:00
Vinnie Falco
2843a497a0 Documentation revision
fix #567, fix #572
2017-07-20 08:15:29 -07:00
Vinnie Falco
788550e833 Add basic_parser header and body limits:
fix #550

* default body limits are now 1MB/8MB
* default header limit is 8KB

Actions Required:

* Call body_limit and/or header_limit as needed to adjust the
  limits to suitable values if the defaults are insufficient.
2017-07-20 08:15:29 -07:00
octopus-prime
b5b1295d0c Add const_body, mutable_body to examples 2017-07-20 08:15:29 -07:00
Vinnie Falco
723ac8392c Doc erratum 2017-07-20 08:15:29 -07:00
Vinnie Falco
edeb44617b Remove BodyReader::is_deferred (API Change):
The is_deferred nested type is removed from the BodyReader
requirements.

Performance for sending messages with `file_body` was cut
almost in half with is_deferred as `std::true_type` since
it caused double the number of socket writes. If the
deferred behavior is absolutely necessary, callers can get
the same effect by manually sending the headers first.

Actions Required:

* Callers who need the behavior of is_deferred as `std::true_type`
  should manually construct a serializer and serialize the header
  first, followed by the body.
2017-07-20 08:15:29 -07:00
Vinnie Falco
bf59634bc2 Change BodyReader, BodyWriter requirements (API Change):
Actions Required:

* Change user defined instances of BodyReader and BodyWriter
  to meet the new requirements.
2017-07-20 08:15:29 -07:00
Vinnie Falco
bb1dd72638 Group common example headers 2017-07-20 08:15:29 -07:00
Vinnie Falco
84d7601bdf Rename to http-server-fast 2017-07-20 08:15:29 -07:00
Vinnie Falco
e7b01dc5c4 control_callback replaces ping_callback (API Change):
fix #322

The new callback is informed of all frame types including close.

Actions Required:

* Change calls to websocket::stream::ping_callback to use
  websocket::stream::control_callback

* Change user defined ping callbacks to have the new
  signature and adjust the callback definition appropriately.
2017-07-20 08:15:28 -07:00
Vinnie Falco
fc15f5e0b2 Add http-server-small example 2017-07-20 08:15:28 -07:00
Vinnie Falco
3570895391 Fix doc example link 2017-07-20 08:15:28 -07:00
Vinnie Falco
e389b853c5 Documentation work 2017-07-20 08:15:28 -07:00
Vinnie Falco
e5f1d4d010 Add http-server example 2017-07-20 08:15:28 -07:00
Vinnie Falco
9f7f36a3e9 Add header aliases 2017-07-20 08:15:28 -07:00
Vinnie Falco
86244c8dcf Add serializer request/response aliases 2017-07-20 08:15:28 -07:00
Vinnie Falco
e477574681 Remove make_serializer (API Change):
Actions Required:

* Replace calls to make_serializer with variable declarations
2017-07-20 08:15:28 -07:00
Vinnie Falco
b2ab40f09c Doc tidying
fix #521, fix #524
2017-07-20 08:15:28 -07:00
Vinnie Falco
67e3e801cb Exemplars are compiled code
fix #455
2017-07-20 08:15:28 -07:00
Vinnie Falco
0a674b1b52 Doc tidy 2017-07-20 08:15:27 -07:00
Vinnie Falco
5613ce7e97 Add http::is_fields trait
fix #515
2017-07-20 08:15:27 -07:00
Vinnie Falco
56a561da9a message::prepare_payload replaces message::prepare (API Change):
Actions Required:

* Change calls to msg.prepare to msg.prepare_payload. For messages
  with a user-defined Fields, provide the function prepare_payload_impl
  in the fields type according to the Fields requirements.
2017-07-20 08:15:27 -07:00
Vinnie Falco
f9f6e1e0cc Refine FieldsReader concept (API Change)
* FieldsReader now requires chunked() and keep_alive()

* serializer logic calls into the reader to calculate
  the message metadata

* Removed some of the previous requirements of FieldsReader

Actions Required:

* Implement chunked() and keep_alive() for user defined FieldsReader types.
2017-07-20 08:15:27 -07:00
Vinnie Falco
c3e2de29ef Doc fixes and tidy 2017-07-20 08:15:27 -07:00
Vinnie Falco
d5f15976e7 Tidy up test build scripts and projects 2017-07-20 08:15:27 -07:00
Vinnie Falco
ccf7412eaf Remove libssl-dev from a Travis matrix item
fix #508
2017-07-20 08:15:27 -07:00
Vinnie Falco
a4a4121444 Add multi_port to server-framework 2017-07-20 08:15:27 -07:00
Vinnie Falco
8b5f5c6feb Reorganize SSL examples 2017-07-20 08:15:27 -07:00
Vinnie Falco
65932ee343 Add server-framework SSL HTTP and WebSocket ports 2017-07-20 08:15:27 -07:00
Vinnie Falco
798ff25795 header::version is unsigned (API Change) 2017-07-20 08:15:27 -07:00
Vinnie Falco
9be141a1e0 Reorganize SSL examples 2017-07-20 08:15:27 -07:00
Vinnie Falco
a26017d695 Use generic_cateogry for errno 2017-07-20 08:15:27 -07:00
Vinnie Falco
8b732f94f4 Documentation work 2017-07-20 08:15:26 -07:00
Vinnie Falco
fd9a13b11f New server-framework, full featured server example:
A new server framework is introduced, allowing users to
quickly get off the ground. Example servers are refactored
to use the common framework.
2017-07-20 08:15:26 -07:00
Vinnie Falco
b5306a5712 String comparisons are public interfaces 2017-07-20 08:15:26 -07:00
Vinnie Falco
79d599c9d1 Remove obsolete doc/README.md 2017-07-20 08:15:26 -07:00
Vinnie Falco
611e610c0c Change Body::size signature (API Change):
fix #497

This changes the function signature to accept the `value_type`
instead of the entire message.

Actions Required:

* For any user-defined models of Body, change the function signature
  to accept `value_type const&` and modify the function definition
  accordingly.
2017-07-20 08:15:26 -07:00
Vinnie Falco
b5be1e0d0d Documentation work 2017-07-20 08:15:26 -07:00
Vinnie Falco
2bbb8ab8a2 Documentation tidy 2017-07-20 08:15:26 -07:00
Vinnie Falco
510092d34b Reorganize examples:
* The examples/ directory is renamed to example/

* Each program is in its own directory with its own build scripts
2017-07-20 08:15:26 -07:00
Vinnie Falco
164569157a Update doc/ for docca 2017-07-20 08:15:26 -07:00
Vinnie Falco
9920d4526a Merge commit '6a9a9064c493e4e9db7af16acd6bebf1ec938743' as 'doc/docca' 2017-07-20 08:15:03 -07:00
Vinnie Falco
8fa756aee6 Documentation work 2017-07-20 08:12:20 -07:00
Vinnie Falco
ca109693fb Reset error codes
fix #478
2017-07-20 08:12:20 -07:00
Vinnie Falco
7712ca09b2 Add string_view_body 2017-07-20 08:12:20 -07:00
Vinnie Falco
7bde07a850 Documentation work 2017-07-20 08:12:20 -07:00
Vinnie Falco
a49c096042 read_size replaces read_size_helper:
* detail::read_size_helper is removed

* public function read_size helps determine the optimum
  size for calls to a DynamicBuffer's prepare function.

* special case for Asio types which don't conform to
  the concept but have their own helper function.
2017-07-20 08:12:20 -07:00
Vinnie Falco
d529d6a16f Documentation work 2017-07-20 08:12:19 -07:00
Vinnie Falco
0d70d90b75 Add string_param
fix #451
2017-07-20 08:12:19 -07:00
Vinnie Falco
8f88f9c3bb Remove extraneous doc file 2017-07-20 08:12:19 -07:00
Vinnie Falco
5149cf8495 Add drain_buffer class
fix #457
2017-07-20 08:12:19 -07:00
Vinnie Falco
44995bf071 Documentation work 2017-07-20 08:12:19 -07:00
Vinnie Falco
b49b23ee83 finish(error_code&) is a BodyReader requirement (API Change) 2017-07-20 08:12:19 -07:00
Vinnie Falco
64742a4183 opcode is private (API Change):
* The opcode enum is removed.

Actions Required:

* Remove all occurences of the `opcode` enum at call sites
2017-07-20 08:12:19 -07:00
Vinnie Falco
3d6574da81 ping_callback is a member of stream (API Change):
fix #446

* The ping_callback option struct is removed.

Actions Required:

* Change call sites which use ping_callback with set_option to
  call stream::ping_callback instead.
2017-07-20 08:12:19 -07:00
Vinnie Falco
333067243f write_buffer_size is a member of stream (API Change):
fix #446

* The write_buffer_size option struct is removed.

Actions Required:

* Change call sites which use write_buffer_size with set_option to
  call stream::write_buffer_size instead.
2017-07-20 08:12:19 -07:00
Vinnie Falco
b9dbb76c4f read_message_max is a member of stream (API Change):
fix #446

* The read_message_max option struct is removed.

Actions Required:

* Change call sites which use read_message_max with set_option to
  call stream::read_message_max instead.
2017-07-20 08:12:19 -07:00
Vinnie Falco
513a54835c read_buffer_size is a member of stream (API Change):
fix #446

* The read_buffer_size option struct is removed

Actions Required:

* Change call sites which use read_buffer_size with set_option to
  call stream::read_buffer_size instead.
2017-07-20 08:12:19 -07:00
Vinnie Falco
e6c0d698ee binary, text are members of stream (API Change):
fix #446

* message_type is removed

Actions Required:

* Change call sites which use message_type with set_option
  to call stream::binary or stream::text instead.
2017-07-20 08:12:19 -07:00
Vinnie Falco
f22895224b auto_fragment is a member of stream (API Change):
fix #374, fix #446

* auto_fragment option struct is removed

Actions Required:

* Change call sites which use auto_fragment with set_option
  to call stream::auto_fragment instead.
2017-07-20 08:12:19 -07:00
Vinnie Falco
669b1feae1 Documentation work 2017-07-20 08:12:19 -07:00
Vinnie Falco
cff5be3837 Documentation work 2017-07-20 08:12:19 -07:00
Vinnie Falco
aa752e4dce Remove message free functions (API Change) 2017-07-20 08:12:18 -07:00
Vinnie Falco
3340666ad3 Remove message connection settings (API Change) 2017-07-20 08:12:18 -07:00
Vinnie Falco
80ca9a5961 Body documentation work 2017-07-20 08:12:18 -07:00
Vinnie Falco
943830f6ed Fields concept work 2017-07-20 08:12:18 -07:00
Vinnie Falco
f363654300 Tidy up basic_fields, header, and concepts 2017-07-20 08:12:18 -07:00
Vinnie Falco
ca25eee0dd Use field in basic_fields and call sites 2017-07-20 08:12:18 -07:00
Vinnie Falco
d5f22adeca Documentation reference tidy 2017-07-20 08:12:18 -07:00
Vinnie Falco
67df48daa6 Documentation work 2017-07-20 08:12:18 -07:00
Vinnie Falco
2df6783468 Refactor prepare (API Change) 2017-07-20 08:12:18 -07:00
Vinnie Falco
2af19481a9 Derive header from Fields (API Change) 2017-07-20 08:12:18 -07:00
Vinnie Falco
ff216a89a8 Add verb to on_request for parsers (API Change) 2017-07-20 08:12:18 -07:00
Vinnie Falco
1c063f5bf6 Add field enumeration 2017-07-20 08:12:18 -07:00
Vinnie Falco
f3bec70e65 Documentation fixes 2017-07-20 08:12:18 -07:00
Vinnie Falco
9f7abcbe2d Remove header_parser (API Change) 2017-07-20 08:12:18 -07:00
Vinnie Falco
fa28cba515 parser is constructible from other body types 2017-07-20 08:12:18 -07:00
Vinnie Falco
4b866cea36 Documentation work 2017-07-20 08:12:18 -07:00
Vinnie Falco
b38f8260b8 Add HEAD request example 2017-07-20 08:12:18 -07:00
Vinnie Falco
3803c38dbd Refactor header status, reason, and target (API Change):
* header::result is a family of functions to replace header::status

* header interface now uses status enum and also ints

* reason-phrase is no longer stored unless the user explicitly
  requests it.

* When serializing, the standard reason is used for the
  corresponding status code unless the user has changed it.
2017-07-20 08:12:18 -07:00
Vinnie Falco
048ee7523c Refactor method and verb (API Change):
The verb interfaces now use verb::unknown instead of
boost::optional<verb> == boost::none to indicate that
the request-method is an unrecognized string.

The http::header interface is modified to focus more on the
verb enum rather than the string. For recognized verbs, the
implementation stores an integer instead of the string.
Unknown verbs are still stored as strings.

* header::method now returns a verb
* header::method_string returns the method text
2017-07-20 08:12:18 -07:00
Vinnie Falco
d3049fa03b Documentation work 2017-07-20 08:12:18 -07:00
Vinnie Falco
5c46845208 Documentation work 2017-07-20 08:12:18 -07:00
Vinnie Falco
78d9e3bbce Documentation work 2017-07-20 08:12:18 -07:00
Vinnie Falco
00667f3cf2 Rename to parser (API Change):
* message_parser is renamed to parser
2017-07-20 08:12:18 -07:00
Vinnie Falco
86ce017ffe Documentation work 2017-07-20 08:12:18 -07:00
Vinnie Falco
9ab9f09189 Make buffer_prefix_view public
fix #408
2017-07-20 08:12:18 -07:00
Vinnie Falco
982d20001f Rename to buffer_cat_view (API Change)
fix #408
2017-07-20 08:12:18 -07:00
Vinnie Falco
2141fabcf9 Tidy up chunk decorator (API Change):
* Rename to no_chunk_decorator
* Decorator no longer has to append "\r\n" to the returned string
2017-07-20 08:12:18 -07:00