fix#778
* The body data member is replaced with accessor
member functions.
Actions Required:
* Call member function message::body instead of accessing
the data member at call sites.
* This presence of the user-declared copy constructor makes
the compiler-provided copy assignment operator deprecated.
This change allows the compiler to provide both copy members
without deprecated behavior.
* 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.
* Stream write operations now return the number of bytes
transferred from the caller's input buffers.
Actions Required:
* Modify websocket write completion handlers to receive
the extra std::size_t bytes_transferred parameter.
* stream overloads of accept which take both a message
and a buffer sequence are removed.
Actions Required:
* Do not call websocket accept overloads which take
both a message and a buffer sequence, as it is
illegal per rfc6455.
fix#642
This changes websocket::stream close and async_close to automatically
read and discard incoming message frames before shutting down the
connection. It is no longer necessary to manually drain the connection.
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
* 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.
* 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.
fix#642
* Calls to stream::close and stream::async_close will
automatically perform the required read operations
Actions Required:
* Remove calling code which drains the connection after
calling stream::close or stream::async_close
fix#692
The value of Content-Length is not checked for limits
when the semantics of an HTTP response indicate that
the message has no body. For example, when status is 101.
fix#653
Actions Required:
* Modify calls to set the control frame callback, to
pass non-const reference instances, and manage the
lifetime of the instance.
* read and async_read now return the number of bytes inserted
into the caller's buffer.
Actions Required:
* Change the signature of completion handlers used with
websocket::stream::async_read to void(error_code, std::size_t)