Commit Graph
199 Commits
Author SHA1 Message Date
Denis Andrejew 3d1488a4e5 Fix typos in design.qbk 2017-07-20 08:12:14 -07:00
Vinnie Falco 93e58f7dab Update documentation examples
fix #222
2017-07-20 08:12:14 -07:00
Vinnie Falco 606ad187ba Disable Boost.Coroutine deprecation warning 2017-07-20 08:12:14 -07:00
Vinnie Falco 64e0bb15ad Fix websocket stream read documentation 2017-07-20 08:12:14 -07:00
Vinnie Falco c6dae58364 Update README.md example programs
fix #219
2017-07-20 08:12:14 -07:00
Vinnie Falco ffe2e8e02b Avoid copies in handler_alloc 2017-07-20 08:12:14 -07:00
Vinnie Falco 4ab2b5e5e7 Add handler helpers 2017-07-20 08:12:14 -07:00
Vinnie Falco 01e1fa2dc9 Implement asio dealloc-before-invoke guarantee:
fix #215

This change guarantees that temporary memory allocated
through the asio hooks by the Beast implementation is
deallocated before invoking the final handler when performing
composed operations.

The change is accomplished by replacing std::shared_ptr with
a thread-safe custom container handler_ptr to manage composed
operation state. The container tracks other instances which
manage the same object and resets them in a safe way before
invoking the final handler.

handler_ptr is provided as a public interface so that users of
this library can utilize the same idiom to write their own
composed operations.
2017-07-20 08:12:14 -07:00
Vinnie Falco 1a26484eca Add missing include 2017-07-20 08:12:14 -07:00
Vinnie Falco f70ac4cb86 Fix broken Intellisense (MSVC)
Fix #213
2017-07-20 08:12:14 -07:00
Vinnie Falco a5d063d5b9 Set version to 1.0.0-b21 2017-07-20 08:12:14 -07:00
Vinnie Falco f8590a31a9 Remove extraneous includes
fix #207
2017-07-20 08:12:14 -07:00
Vinnie Falco 51ee01ed95 Set version to 1.0.0-b20 2017-07-20 08:12:14 -07:00
Miguel Portilla c49bee78db Increase utf8 checker code coverage 2017-07-20 08:12:14 -07:00
Vinnie Falco 5089cf59ee Add zlib module:
The zlib module is a port of ZLib's raw deflate
algorithm to header-only C++11.
2017-07-20 08:12:14 -07:00
Vinnie Falco e3848e7281 Refactor HTTP identifier names (API Change):
fix #171

Several names and  HTTP identifiers are renamed to be
more consistent, self-explanatory, and concise:

* "Fields" is a collection of HTTP header fields (rfc7230 section 3.2)
* "Header" is the Start Line plus Fields. Another way to look at it is,
  the HTTP message minus the body.
* `basic_fields` replaces `basic_headers`
* `fields` replaces `headers`
* `Fields` replaces `Headers` in template parameter lists
* `header` replaces `message_headers`
* `header::fields` replaces `message_headers::fields`

The changes are cosmetic and do not affect run-time behavior.
2017-07-20 08:12:13 -07:00
Vinnie Falco 879262abb1 Set version to 1.0.0-b19 2017-07-20 08:12:13 -07:00
Vinnie Falco 77bdb43843 Tidy up internal name 2017-07-20 08:12:13 -07:00
Vinnie Falco be67224390 Better buffer_cat:
buffer_cat now determines if all of the buffer sequences in
the list of passed buffer sequences each have value types which
are convertible to mutable_buffer. The returned concatenated
sequence will be a MutableBufferSequence if all the passed
buffer sequences meet the requirements of MutableBufferSequence,
else the returned concatenated sequence will be a ConstBufferSequence.
2017-07-20 08:12:13 -07:00
Vinnie Falco 6afa6afc98 Fix consuming_buffers value_type (API Change):
This fixes a bug where instantiations of consuming_buffers with
buffer sequence types whose value_type is not const_buffer or
mutable_buffer can cause compilation errors.

The function consumed_buffers is removed.
2017-07-20 08:12:13 -07:00
Vinnie Falco 8f535ba74f prepared_buffers is private (API Change) 2017-07-20 08:12:13 -07:00
Vinnie Falco 08d8a2ae35 Fix prepare_buffers value_type:
This fixes a bug where calling prepare_buffers on a buffer
sequence whose value_type is not const_buffer or mutable_buffer
causes compilation errors.

The documentation is also tidied up.
2017-07-20 08:12:13 -07:00
Vinnie Falco aa8e7432c2 Use boost::lexical_cast instead of std::to_string
fix #176
2017-07-20 08:12:13 -07:00
Vinnie Falco 2a50915322 Fix with_body example:
fix #177
2017-07-20 08:12:13 -07:00
Vinnie Falco 5b041193f2 Increase code coverage 2017-07-20 08:12:13 -07:00
Vinnie Falco 6d2195514d Boost library min/max guidance:
fix #170
2017-07-20 08:12:13 -07:00
Vinnie Falco 1eb673dd7d Add read, async_read for message_headers:
fix #172, fix #173

This provides overloads of read and async_read to allow
reading message_headers objects.
2017-07-20 08:12:13 -07:00
Vinnie Falco 8035dac88c Add write, async_write, operator<< for message_headers:
fix #155

This adds overloads of write, async_write, and operator<<
for message_headers.
2017-07-20 08:12:13 -07:00
Vinnie Falco f98ec17121 Make chunk_encode public:
fix #154, fix #156

This adds public interfaces for transforming buffer
sequences into their chunk-encoded equivalents. The
transformations are O(1) in space and time.
2017-07-20 08:12:13 -07:00
Vinnie Falco 50bc9a58cd Refactor message and message_headers declarations:
message_headers is now a set of partial class template
specializations instead of a template class alias. This solves
a problem where template functions taking message_headers as a
parameter could not deduce argument types, since std::conditional
obscured the deduced context.

Both classes are refactored to share declarations using an #ifdef,
to eliminate an ugly set of extra declarations needed when building
the documentation.

Copy and move class special members are added.

A new function message::base() is provided which returns the
message_headers portion of a message.
2017-07-20 08:12:13 -07:00
Vinnie Falco 595c5e0b6b Move sync_ostream to core/detail 2017-07-20 08:12:13 -07:00
Vinnie Falco 312bd6b21d Optimize mask operations 2017-07-20 08:12:13 -07:00
Miguel Portilla d91fbd0611 Optimize utf8 validation 2017-07-20 08:12:13 -07:00
Vinnie Falco 804038095c Set version to 1.0.0-b18 2017-07-20 08:12:13 -07:00
Vinnie Falco f904759877 Add websocket::stream pong and async_pong 2017-07-20 08:12:13 -07:00
Vinnie Falco f56d4fe74b Close connection during async_read on close frame:
fix #163
2017-07-20 08:12:13 -07:00
Vinnie Falco a2ea4f38c1 Move clamp to core 2017-07-20 08:12:13 -07:00
Vinnie Falco a878165e36 Fix write_frame masking and auto-fragment handling 2017-07-20 08:12:13 -07:00
Vinnie Falco dfb2d05be3 Write buffer option does not change capacity 2017-07-20 08:12:13 -07:00
Vinnie Falco 74e77682c7 Meet DynamicBuffer requirements for static_streambuf 2017-07-20 08:12:13 -07:00
Vinnie Falco 4e25e0f99e Reorganize source files and definitions 2017-07-20 08:12:13 -07:00
Mike Ellery 38b89d7cab Override incremental link flags:
fix #160

Disable incremental linking for RelWithDebInfo builds on MSVC.
2017-07-20 08:12:13 -07:00
Vinnie Falco c75992a4af Higher optimization settings for MSVC builds 2017-07-20 08:12:13 -07:00
Vinnie Falco 1a53f52e34 Check invariants in parse_op:
This adds more assertions, comments, and clarification.
2017-07-20 08:12:13 -07:00
Vinnie Falco 95a00e5f06 Remove unused field in test 2017-07-20 08:12:13 -07:00
Vinnie Falco bac57e08e9 unit_test improvements:
* New overload of fail() specifies file and line
* BEAST_EXPECTS only evaluates the reason string on a failure
  - This speeds up tests that call BEAST_EXPECTS
2017-07-20 08:12:13 -07:00
Vinnie Falco 8f6e238ab9 Clean up message docs 2017-07-20 08:12:13 -07:00
Vinnie Falco 0e1be4d2cb Set version to 1.0.0-b17 2017-07-20 08:12:13 -07:00
Vinnie Falco 48674cd482 Trim unused code 2017-07-20 08:12:13 -07:00
Vinnie Falco 4f68ec7b7b Doc fixes 2017-07-20 08:12:13 -07:00