247 Commits
Author SHA1 Message Date
Denis Glazachev 24ccdd243a Fix some typos 2019-03-30 11:12:04 -07:00
Damian Jarek 5a0b4d7ebe More split compilation in HTTP
close #1541

- Remove unused private functions: `skip_ows_rev`, `skip_obs_fold`.
- Enable split compilation in `http/detail/rfc7230.hpp`.
- More split compilation in `basic_parser`.
- Remove some unnecessary includes.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-24 11:05:24 -07:00
Damian Jarek dc52df351a Enable more split compilation in websocket and http
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-10 13:23:22 -07:00
Damian Jarek b9aad3d06c Fix completion handler invocation signatures
Completion handlers should be called with the exact same signature as
provided to `async_result`.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-07 12:56:40 -08:00
Vinnie Falco 45353a7f04 handler_ptr is deprecated (API Change):
* `handler_ptr` is deprecated and should not be used.

Actions Required:

* Replace use of `handler_ptr` with `stable_async_base`
  and `allocate_stable`.
2019-03-06 10:38:08 -08:00
Vinnie Falco e073a9e7fc Tidy up docs 2019-03-05 20:15:07 -08:00
Vinnie Falco 9f2b0ce1db Rename to buffer_bytes 2019-03-05 11:09:53 -08:00
Vinnie Falco 6ccdcdf51d buffer_size is in buffer_traits.hpp 2019-03-05 11:09:50 -08:00
Vinnie Falco 8e2620e2b1 Doc tidy 2019-03-05 08:00:14 -08:00
Vinnie Falco e4342b51b2 SSL teardowns are in an associated namespace 2019-03-04 18:33:24 -08:00
Damian Jarek 8f83b4e611 Fix UB in decorator:
- don't assume layout or size overhead of classes with
  virtual members (use split vtable)
- don't use SOO for types with throwing move

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-04 14:44:15 -08:00
Vinnie Falco 4eb137f8ea Fix decorator for certain sizes 2019-03-03 17:13:56 -08:00
Eelis van der Weegen 9992701a4a Fix ubsan false positive:
* Avoid calling stream() on partially constructed object.

Fixes #1495, fix #1496
2019-03-03 13:36:31 -08:00
Vinnie Falco 62878255fb Workaround for msvc-14.0 2019-03-03 12:52:35 -08:00
Vinnie Falco ef5282ebcf Tidy up websocket service 2019-02-27 16:44:04 -08:00
Vinnie Falco 92ad50a8e7 Destroy abandoned websocket ops on shutdown
fix #1358
2019-02-27 16:44:01 -08:00
Vinnie Falco 031e13c253 Add websocket service 2019-02-27 16:42:19 -08:00
Vinnie Falco 05b5843e19 Next layer is a base class 2019-02-27 14:48:31 -08:00
Vinnie Falco 8f9eed1faf stream_base::timeout::suggested is a nested function 2019-02-27 06:52:45 -08:00
Vinnie Falco 7953ac281f Pass references as pointers to async_initiate 2019-02-26 07:21:05 -08:00
Vinnie Falco ab9a4c66e0 Doc work 2019-02-26 07:21:04 -08:00
Vinnie Falco 0647c902ac role_type is in boost/beast/core/role.hpp (API Change):
This enumeration is now part of the library core and
not specific to websocket.
2019-02-26 07:20:46 -08:00
Vinnie Falco 81f33a0f89 Rename to async_base, stable_async_base 2019-02-26 07:20:08 -08:00
Vinnie Falco 59bda5d9c6 basic_parser is abstract, not CRTP (API Change):
* `basic_parser` now uses pure virtual member functions instead
  of the curiously recurring template pattern.

Actions Required:

* Change uses of the `basic_parser` type to omit the `Derived`
  template parameter

* Classes derived from `basic_parser` no longer need to friend
  the base.

* Virtual functions in the derived class may be marked `override`.
2019-02-23 11:15:59 -08:00
Vinnie Falco 094f5ec5cb Better treatment of SSL short reads:
fix #38

This improves the behavior when encountering a short read:

* Any stream error encountered during a read is converting into
  `http::error::partial_message` if some data was received but
  the message is incomplete.

* Examples squelch SSL short read errors from the logs.
2019-02-23 08:56:59 -08:00
Vinnie Falco d4dddec1c0 Reduce template instantiations 2019-02-23 08:56:57 -08:00
Vinnie Falco 46eb006757 Tidy up docs 2019-02-22 19:46:29 -08:00
Vinnie Falco 955354b9dd Enable split Beast compilation for tests 2019-02-22 17:27:27 -08:00
Vinnie Falco c5af2e7fcc Fixes to some CI targets 2019-02-22 15:39:34 -08:00
Vinnie Falco ee13bfad70 Fast prng is pcg 2019-02-21 13:19:23 -08:00
Vinnie Falco 6ada618c12 Check BOOST_NO_CXX11_THREAD_LOCAL 2019-02-21 11:09:02 -08:00
Vinnie Falco d08cc82e15 Use async_initiate 2019-02-21 06:39:35 -08:00
Vinnie Falco e2d3f741b8 Fix compile errors 2019-02-20 22:37:00 -08:00
Vinnie Falco eea3929b26 Concept check tidying 2019-02-20 19:19:59 -08:00
Vinnie Falco 2b92189b65 Doc tidying 2019-02-20 19:09:21 -08:00
Vinnie Falco c681241d70 Large WebSocket Upgrade response no longer overflows
fix #1460
2019-02-20 18:58:59 -08:00
Vinnie Falco 28d3b41a43 websocket idle pings 2019-02-20 07:12:36 -08:00
Vinnie Falco 6baa607295 Fixes to support Asio changes (API Change):
This adjusts Beast's interfaces and implementation to match
the changes in Boost.Asio.
2019-02-19 16:23:30 -08:00
Vinnie Falco bc436da9c5 Documentation work 2019-02-19 16:23:30 -08:00
Vinnie Falco 3f50efa138 WebSocket Decorator is a socket option (API Change):
This changes the interface used to apply a decorator to the HTTP
request or response messages used to perform the WebSocket handshake
as follows:

* Add the `stream_base::decorator` option object

* Add `stream::set_option` overload to set the decorator from
  the option

* The decorator applies to all client and server handshakes
  performed on the stream after the option is set.

* Overloads of the following functions which accept a Decorator
  are deprecated:
  - accept, accept_ex
  - handshake, handshake_ex
  - async_accept, async_accept_ex
  - async_handshake, async_handshake_ex

Actions Required:

* Code which passes decorator to any `websocket::stream` member
  function should call `stream::set_option` instead with a newly
  constructed `stream_base::decorator` object containing the
  decorator. Alternatively, the macro `BOOST_BEAST_ALLOW_DEPRECATED`
  may be defined to 1.
2019-02-19 16:23:30 -08:00
Vinnie Falco 085fb66b26 websocket test coverage 2019-02-18 12:18:27 -08:00
Vinnie Falco e831e8b7ee Add detail::decorator 2019-02-18 12:18:27 -08:00
Vinnie Falco 79c777e776 Tidying and fixes 2019-02-18 12:18:27 -08:00
Vinnie Falco fc7b47fc5d Use suggested timeouts in Websocket examples 2019-02-18 12:18:27 -08:00
Vinnie Falco f21358186e Add websocket::stream timeouts 2019-02-18 12:18:27 -08:00
Vinnie Falco dfd08bf6ae Refactor websocket::stream operations 2019-02-18 12:18:27 -08:00
Vinnie Falco 5c01953076 Remove unused file 2019-02-16 15:09:35 -08:00
Vinnie Falco 2e62f25701 Use async_op_base::invoke 2019-02-16 15:09:34 -08:00
Vinnie Falco fdaf2ea7e1 Rename to async_op_base::invoke_now 2019-02-16 13:36:01 -08:00
Vinnie Falco 9b14774ada basic_stream subsumes stranded_stream:
* All functionality of stranded_stream is folded into basic_stream
* tcp_stream is an alias for basic_stream with tcp
* The tests are expanded to produce full coverage
* Timeout implementation is simplified
2019-02-10 11:42:01 -08:00