Commit Graph
983 Commits
Author SHA1 Message Date
Vinnie Falco 3e88b837db Tune websocket echo server for performance 2017-01-17 14:40:15 -05:00
Vinnie Falco 1ab7a2f04c Set version to 1.0.0-b22 2017-01-08 10:15:26 -05:00
Denis Andrejew 2eb4b0c6cd Fix code sample in websocket.qbk 2017-01-08 10:15:20 -05:00
Denis Andrejew 58802f4d6d Fix typos in design.qbk 2017-01-08 10:15:19 -05:00
Vinnie Falco 19dc4bb628 Update documentation examples
fix #222
2017-01-08 07:23:58 -05:00
Vinnie Falco 10dbc5b96a Disable Boost.Coroutine deprecation warning 2017-01-07 16:07:04 -05:00
Vinnie Falco 01c76c7b5c Fix websocket stream read documentation 2017-01-07 16:07:03 -05:00
Vinnie Falco d152c96f45 Update README.md example programs
fix #219
2017-01-07 16:07:03 -05:00
Vinnie Falco 995d86fcc3 Avoid copies in handler_alloc 2017-01-07 16:07:02 -05:00
Vinnie Falco 851cb62a50 Add handler helpers 2017-01-07 16:07:02 -05:00
Vinnie Falco 114175cd1f 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-01-07 16:07:01 -05:00
Vinnie Falco 681db2efb8 Add missing include 2017-01-04 12:49:43 -05:00
Vinnie Falco 7db3c6eacf Fix broken Intellisense (MSVC)
Fix #213
2016-12-30 09:39:51 -05:00
Vinnie Falco 09c183d112 Set version to 1.0.0-b21 2016-12-16 10:59:15 -05:00
Vinnie Falco 1cb01fed1b Remove extraneous includes
fix #207
2016-12-16 10:59:05 -05:00
Vinnie Falco 62e65ed5e2 Set version to 1.0.0-b20 2016-11-15 13:09:24 -05:00
Miguel Portilla 45eaa8c8da Increase utf8 checker code coverage 2016-11-15 13:09:18 -05:00
Vinnie Falco 9ff1a27160 Add zlib module:
The zlib module is a port of ZLib's raw deflate
algorithm to header-only C++11.
2016-11-15 12:04:59 -05:00
Vinnie Falco a0a335972f 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.
2016-11-15 12:04:44 -05:00
Vinnie Falco 79be7f8b39 Set version to 1.0.0-b19 2016-11-12 12:37:35 -05:00
Vinnie Falco eda1120c63 Tidy up internal name 2016-11-12 11:27:59 -05:00
Vinnie Falco 4130ad4832 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.
2016-11-12 11:27:59 -05:00
Vinnie Falco f94f21db0b 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.
2016-11-12 11:27:59 -05:00
Vinnie Falco 2c524b41ab prepared_buffers is private (API Change) 2016-11-12 11:27:58 -05:00
Vinnie Falco df2a1081c9 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.
2016-11-12 11:27:58 -05:00
Vinnie Falco a4af9d6769 Use boost::lexical_cast instead of std::to_string
fix #176
2016-11-12 11:27:57 -05:00
Vinnie Falco 62d670b94a Fix with_body example:
fix #177
2016-11-12 11:27:57 -05:00
Vinnie Falco a63bd84ee3 Increase code coverage 2016-11-12 11:27:57 -05:00
Vinnie Falco 84a6775dc1 Boost library min/max guidance:
fix #170
2016-11-12 11:27:56 -05:00
Vinnie Falco 02feea5128 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.
2016-11-12 11:27:56 -05:00
Vinnie Falco f22458539b Add write, async_write, operator<< for message_headers:
fix #155

This adds overloads of write, async_write, and operator<<
for message_headers.
2016-11-12 11:27:55 -05:00
Vinnie Falco ea48bcf4e6 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.
2016-11-12 11:27:55 -05:00
Vinnie Falco f6dd744fd1 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.
2016-11-12 11:27:55 -05:00
Vinnie Falco 9fd8aede3d Move sync_ostream to core/detail 2016-11-12 11:27:54 -05:00
Vinnie Falco c98b2d3728 Optimize mask operations 2016-11-12 11:27:54 -05:00
Miguel Portilla d4dfc1ac74 Optimize utf8 validation 2016-11-12 11:27:54 -05:00
Vinnie Falco 7b4de4b951 Set version to 1.0.0-b18 2016-11-04 08:02:50 -04:00
Vinnie Falco feb520414c Add websocket::stream pong and async_pong 2016-11-03 18:58:31 -04:00
Vinnie Falco d4ffde5982 Close connection during async_read on close frame:
fix #163
2016-11-01 09:01:02 -04:00
Vinnie Falco 644d518db5 Move clamp to core 2016-11-01 09:01:01 -04:00
Vinnie Falco 427ba388f7 Fix write_frame masking and auto-fragment handling 2016-11-01 09:01:01 -04:00
Vinnie Falco 54a51b1232 Write buffer option does not change capacity 2016-11-01 09:01:01 -04:00
Vinnie Falco 591dbc07f5 Meet DynamicBuffer requirements for static_streambuf 2016-11-01 09:01:00 -04:00
Vinnie Falco 46d5e7256c Reorganize source files and definitions 2016-11-01 09:01:00 -04:00
Mike Ellery efa4b8f30f Override incremental link flags:
fix #160

Disable incremental linking for RelWithDebInfo builds on MSVC.
2016-11-01 09:00:59 -04:00
Vinnie Falco eef6e8608d Higher optimization settings for MSVC builds 2016-11-01 09:00:59 -04:00
Vinnie Falco b6f3a3654d Check invariants in parse_op:
This adds more assertions, comments, and clarification.
2016-10-30 18:56:00 -04:00
Vinnie Falco 47b0fa662f Remove unused field in test 2016-10-30 18:55:19 -04:00
Vinnie Falco 8b8e57eaad 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
2016-10-30 18:55:15 -04:00
Vinnie Falco e90725267d Clean up message docs 2016-10-30 18:55:10 -04:00