Commit Graph
217 Commits
Author SHA1 Message Date
Vinnie Falco 8ea120f13f Fix 32-bit arm7 warnings
fix #232
2017-07-20 08:12:14 -07:00
Vinnie Falco d7e9a7ca3c Better handler_ptr (API Change):
fix #242

* Add public constructors
* Add handler_ptr::empty()
* Add handler_ptr::element_type
* Remove make_handler_ptr free function
* Compiler error if element_type is an array type
* handler_ptr::get() returns nullptr if no object is owned
2017-07-20 08:12:14 -07:00
Vinnie Falco e81a2864ab Fixes for websocket echo server:
* Decorator members are const
* Enable permessage-deflate extension
2017-07-20 08:12:14 -07:00
Vinnie Falco bf7864cfc6 Set version to 1.0.0-b24 2017-07-20 08:12:14 -07:00
Vinnie Falco 911617c43f Add permessage-deflate WebSocket extension:
This implements the permessage-deflate WebSocket
extension as described in HyBi Working Group
draft-ietf-hybi-permessage-compression-28:
https://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-28

This extension allows messages to be compressed using
the raw "deflate" algorithm described in RFC 1951,
"DEFLATE Compressed Data Format Specification version 1.3":
https://www.ietf.org/rfc/rfc1951.txt
2017-07-20 08:12:14 -07:00
Vinnie Falco 99706347cd Make decorator copyable 2017-07-20 08:12:14 -07:00
Vinnie Falco c594bbac3f Add optional yield_to arguments 2017-07-20 08:12:14 -07:00
Edward Hennis 6840f5840f Simplify Travis package install specification 2017-07-20 08:12:14 -07:00
Miguel Portilla 896b462c1f bjam use clang on MACOSX 2017-07-20 08:12:14 -07:00
Edward Hennis 1cd8b8c6b4 Set version to 1.0.0-b23 2017-07-20 08:12:14 -07:00
Edward Hennis c4b3453e90 Travis CI improvements:
* Update boost package URL
* Retry Travis build script
* Respect Travis's $NUM_PROCESSORS limit
* Disable sudo
* Disable autobahn tests
* Show output from the wsecho server during autobahn
2017-07-20 08:12:14 -07:00
Vinnie Falco 133d926e2f Fix message constructor and special members
fix #196
2017-07-20 08:12:14 -07:00
Vinnie Falco d24190cfdf Add copy special members 2017-07-20 08:12:14 -07:00
Vinnie Falco 020a254b1b Better logging in async echo server 2017-07-20 08:12:14 -07:00
Vinnie Falco cfde28c3c3 Add file and line number to thrown exceptions 2017-07-20 08:12:14 -07:00
Vinnie Falco e66327ed4d Tune websocket echo server for performance 2017-07-20 08:12:14 -07:00
Vinnie Falco 31b8c42111 Set version to 1.0.0-b22 2017-07-20 08:12:14 -07:00
Denis Andrejew 48c57b0538 Fix code sample in websocket.qbk 2017-07-20 08:12:14 -07:00
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