Commit Graph

758 Commits

Author SHA1 Message Date
Vinnie Falco
cfbdce3e5c Constrain to_static_string to integers 2019-03-12 13:44:48 -07:00
Vinnie Falco
30d1972aa2 Add missing include 2019-03-11 13:24:20 -07:00
Vinnie Falco
44f37d1a11
Set version to 230 2019-03-10 13:23:26 -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
Vinnie Falco
d2041c0322 Doc tidying 2019-03-08 09:33:52 -08: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
fdf64a4550 Remove dynamic_buffer_ref:
* dynamic_buffer_ref is removed, because Asio / Networking
  has introduced the DynamicBuffer_v2 concept which is incompatible
  with Beast's storage types.

The next version of Beast (1.70) will provide changes to
interoperate with Asio / Networking's new concepts.
2019-03-07 12:56:40 -08:00
Vinnie Falco
f4e2a327c8 Don't use dynamic_buffer_ref 2019-03-07 12:56:40 -08:00
Vinnie Falco
79e6c61db5
Set version to 229 2019-03-06 11:52:52 -08:00
Vinnie Falco
06a42f2202 Fix stable_async_base example 2019-03-06 10:38:08 -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
7f53b0f66c detect_ssl returns a bool
fix #1288
2019-03-06 05:50:22 -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
31331bbe4d
Set version to 228 2019-03-04 18:33:27 -08:00
Vinnie Falco
e4342b51b2 SSL teardowns are in an associated namespace 2019-03-04 18:33:24 -08:00
Vinnie Falco
75c3ca622f Sync up convenience headers 2019-03-04 14:44:31 -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
dc239fbb39 Set version to 227 2019-03-03 20:28:54 -08:00
Vinnie Falco
0e4e7ff370 ~basic_parser is virtual 2019-03-03 19:31:52 -08:00
Vinnie Falco
4eb137f8ea Fix decorator for certain sizes 2019-03-03 17:13:56 -08:00
Vinnie Falco
1e5b4f531d
Set version to 226 2019-03-03 13:36:36 -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
1432d336be Move parser definitions to .ipp 2019-03-02 09:13:08 -08:00
Vinnie Falco
edf5b7cd03 Fix HTTP parser static string calculation 2019-03-02 09:13:08 -08:00
Vinnie Falco
cec63d923c Tidy up appveyor error 2019-03-02 07:33:57 -08:00
Vinnie Falco
fca4b3ae10 make_strand is in net:: 2019-03-02 07:33:57 -08:00
Damian Jarek
c7a7d16992 Allow the use of string_body and vector_body with -fno-exceptions
`string_body` and `vector_body` will no longer translate all exceptions
to "buffer_overflow" error code. `buffer_overflow` error can now only
occur if the Body's max_size() is exceeded.

Changes required:
Code that relies on exceptions thrown from value_type's reserve/resize
being translated into an error code must implement a mechanism to catch
the exception.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-01 14:50:50 -08:00
Vinnie Falco
8c53abe6e5 Support -fno-exceptions 2019-03-01 13:52:50 -08:00
Vinnie Falco
723fceaf67
Set version to 225 2019-03-01 12:02:47 -08:00
Vinnie Falco
a3f0ea3573 Move macro from config.hpp 2019-03-01 10:47:09 -08:00
Vinnie Falco
df93a8dbf1
Set version to 224 2019-02-28 11:43:15 -08:00
Vinnie Falco
00487f1de6 Reusing an HTTP parser returns an error 2019-02-28 10:27:43 -08:00
Vinnie Falco
f611807bc0
Set version to 223 2019-02-27 18:15:11 -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
c510662c67 Add test::stream::service 2019-02-27 14:05:16 -08:00
Vinnie Falco
5af7ad2e15
Set version to 222 2019-02-27 07:01:42 -08:00
Vinnie Falco
22b6fa4121 Reduce instantiations in detect_ssl 2019-02-27 06:54:55 -08:00
Vinnie Falco
d0cf40d5b2 Fix as-if post 2019-02-27 06:53:22 -08:00
Vinnie Falco
8f9eed1faf stream_base::timeout::suggested is a nested function 2019-02-27 06:52:45 -08:00
Vinnie Falco
b02f59ff91
Set version to 221 2019-02-26 07:21:15 -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
Damian Jarek
e9ba521c60 Cleanup in test::stream internals:
* avoid one instantiation of `bind_handler_front`
* avoid going through the 2-arg post unnecessarily in `read_op`

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-02-26 07:20:48 -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
28eecefaaa
Set version to 220 2019-02-24 19:44:12 -08:00
Vinnie Falco
d9400ce618 Refactor docs 2019-02-24 18:46:27 -08:00
Vinnie Falco
3038234376
Set version to 219 2019-02-23 12:07:39 -08:00
Vinnie Falco
f92999b613 Doc work 2019-02-23 12:04:48 -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
bbd62dd181 ssl_stream is a public interface 2019-02-23 09:57:45 -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
Damian Jarek
d048aa8e7e More split definitions in test::stream
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-02-22 17:42:44 -08:00
Vinnie Falco
c82237512a
Set version to 218 2019-02-22 17:27:33 -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
90b783cb62 detect_ssl, async_detect_ssl are public interfaces 2019-02-22 15:39:34 -08:00
Vinnie Falco
b2807ae3ee
Set version to 217 2019-02-21 13:19:43 -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
51994d133f Release notes 2019-02-20 18:58:59 -08:00
Vinnie Falco
b7f2792062 Fix file_body_win32
fix #1464
2019-02-20 15:30:03 -08:00
Vinnie Falco
c3c3777661 Pass strand to async_accept 2019-02-20 15:30:03 -08:00
Vinnie Falco
fd4b080a4a RatePolicy documentation 2019-02-20 15:30:03 -08:00
Vinnie Falco
093f966f69 Disable bind_continuation 2019-02-20 15:30:02 -08:00
Vinnie Falco
28d3b41a43 websocket idle pings 2019-02-20 07:12:36 -08:00
Vinnie Falco
28f5921bd6
Set version to 216 2019-02-20 07:12:11 -08:00
Vinnie Falco
a5adc328e4 basic_stream uses async_initiate 2019-02-19 16:27:27 -08:00
Vinnie Falco
c5b655c954 basic_stream connects are members 2019-02-19 16:27:27 -08:00
Vinnie Falco
0ad7390e94 Use async_initiate in basic_stream 2019-02-19 16:27:26 -08:00
Vinnie Falco
23a7bcc67e Add RatePolicy to basic_stream 2019-02-19 16:23:30 -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
ac24e58fb3 Add make_strand 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
9f8cf7d599
Set version to 215 2019-02-16 15:09:38 -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
f41363c60c Add async_op_base::invoke 2019-02-16 15:09:33 -08:00
Vinnie Falco
fdaf2ea7e1 Rename to async_op_base::invoke_now 2019-02-16 13:36:01 -08:00
Vinnie Falco
a781285e2f Add experimental test/handler.hpp 2019-02-16 13:36:01 -08:00
Vinnie Falco
92add2afa6 bind_front_handler works with member functions 2019-02-14 16:16:04 -08:00
Vinnie Falco
d410b429c0 Remove bind_back_handler 2019-02-14 16:11:14 -08:00
Vinnie Falco
5ed9f7712e basic_stream uses boost::shared_ptr 2019-02-14 12:54:32 -08:00
Vinnie Falco
65cbc158cf Tidy up example docs and some names
fix #1450
2019-02-14 07:53:38 -08:00
Vinnie Falco
d43d9421a4
Set version to 214 2019-02-13 14:14:40 -08:00
Vinnie Falco
96b2944f70 Add detail::bind_continuation 2019-02-13 12:59:24 -08:00
Vinnie Falco
b6f215a00d handler binders use the associated allocator 2019-02-12 05:55:07 -08:00
Vinnie Falco
1a80dd4560
Set version to 213 2019-02-10 11:43:25 -08:00
Vinnie Falco
45d722874f Use tcp_stream, HTTP timeouts in advanced servers 2019-02-10 11:43:15 -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
Vinnie Falco
0ce8ebbefd Fix posix_file::close handling of EINTR:
fix #1445

These changes optimize for Linux at the possible
expense of non-conforming platforms like HP-UX.
2019-02-10 05:52:12 -08:00
Vinnie Falco
68ee0df2ce
Set version to 212 2019-02-10 05:51:46 -08:00
Vinnie Falco
168f674b4a Improved websocket stream documentation
fix #1213
2019-02-10 05:51:42 -08:00
Vinnie Falco
b8aa6be7fd stranded_socket tests and tidy 2019-02-08 10:58:23 -08:00
Vinnie Falco
f15bbf10b4 flat_stream tests and tidy 2019-02-08 10:57:58 -08:00
Vinnie Falco
98834967c3 dynamic_buffer_ref tests and tidy 2019-02-08 10:57:41 -08:00
Vinnie Falco
06efddd8b8
Set version to 211 2019-02-07 17:37:21 -08:00
Daniel Sewtz
cd28598e5b Fixes to rfc7230:
fix #1435, fix #1438

* Example and test can be built on msvc v141 15.9.6
  using /std:c++17 and BOOST_BEAST_USE_STD_STRING_VIEW.

* changed string_view.to_string() to std:string(string_view),
  awaiting availability of Library Fundamentals TS here.

* Reactivated relevant tests to param_list. #ifdef 0 test
  exhibited same assertion failed error in debug mode.
  Now fixed in DEBUG on msvc v141 15.9.6 with
  BOOST_BEAST_USE_STD_STRING_VIEW and /std:c++17.

* Looked up http paramters (transfer-encoding, etc.)
  and changed tests as well as fixing comment to
  match specs.
2019-02-07 17:37:18 -08:00
Vinnie Falco
55d319a9d9 multi_buffer::clear preserves capacity 2019-02-07 17:37:18 -08:00
Vinnie Falco
c3125e8358 flat_buffer::clear preserves capacity 2019-02-07 17:37:18 -08:00
Vinnie Falco
27a6f57200 Add flat_stream:
flat_stream, previously in _experimental, is now a public API.
2019-02-07 17:37:18 -08:00
Vinnie Falco
3896f9aa9c Add stranded_stream 2019-02-07 17:37:18 -08:00
Benjamin Buch
cdc6e76ab7 Remove extra semicolon
fix #1436
2019-02-07 08:38:06 -08:00
Vinnie Falco
812a19706a Improvements to test::stream:
The behavior of the test stream when either
end is destroyed or closed is well-defined.
2019-02-06 21:21:25 -08:00
Vinnie Falco
dc02f63050 close_socket is in stream_traits.hpp 2019-02-05 21:03:20 -08:00
Vinnie Falco
5a7a1a3f6c
Set version to 210 2019-02-05 16:28:55 -08:00
Damian Jarek
34362256c0 Fixes to test::stream::async_read:
- Call the completion handler with the correct signature
- Replicate ASIO socket behavior of async operation completions
- Fix a data race between read_op and a call to stream::nread()

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-02-05 16:14:45 -08:00
Vinnie Falco
adcd4bc0c9 is_completion_handler, type_traits.hpp are deprecated (API Change):
* is_completion_handler is deprecated
* type_traits.hpp is a deprecated include

These items will be removed in the next version

* Include the new header file for the types needed:
  - stream_traits.hpp
  - file_base.hpp
* Use std::is_invocable instead of is_completion_handler
2019-02-05 14:16:30 -08:00
Vinnie Falco
11c708e29d Tidy up inline variable macro definition 2019-02-05 12:09:47 -08:00
Vinnie Falco
d2669d2a78 is_invocable is in its own header file 2019-02-05 10:11:02 -08:00
Vinnie Falco
8ea8f41bba is_file is in file_base.hpp (API Change):
* The metafunction `is_file` is part of file_base.hpp

Actions Required

* Include file_base.hpp as needed
2019-02-05 09:56:49 -08:00
Vinnie Falco
44d9eaba4d Tidying 2019-02-05 09:56:48 -08:00
Vinnie Falco
98aed8ed49 Fix hexadecimal string conversion table:
Defect discovered by PVS-Studio
2019-02-05 09:56:36 -08:00
Vinnie Falco
477cd75153 Stream traits are in stream_traits.hpp (API Change):
These metafunctions are moved from type_traits.hpp
to stream_traits.hpp:

- has_get_executor
- is_sync_stream
- is_sync_read_stream
- is_sync_write_stream
- is_async_stream
- is_async_read_stream
- is_async_write_stream

Actions Required:

* Include the file stream_traits.hpp as needed
2019-02-05 09:56:34 -08:00
Vinnie Falco
9cee4e053f Add executor_type trait 2019-02-05 07:46:09 -08:00
Vinnie Falco
42d83b221a Add stream_traits.hpp:
get_lowest_layer, lowest_layer_type are located here now.
2019-02-05 07:45:36 -08:00
Vinnie Falco
4b7c33d781 Remove unnecessary file 2019-02-04 19:53:11 -08:00
Vinnie Falco
28858c60fd Better handling of stream timeouts 2019-02-04 07:26:02 -08:00
Vinnie Falco
8814ac4b35 Remove unused file 2019-02-04 07:23:50 -08:00
Vinnie Falco
b70966ad47 Fix stable_async_op_base javadoc 2019-02-03 17:17:59 -08:00
Vinnie Falco
9b88446ab8 Tidy up read implementation 2019-02-03 17:17:03 -08:00
Vinnie Falco
18a5f43639
Set version to 209 2019-02-03 12:59:13 -08:00
Vinnie Falco
35dbd140d4 Add buffer_size 2019-02-03 12:59:11 -08:00
Vinnie Falco
17ada67f0d Add dynamic_buffer_ref 2019-02-02 16:14:10 -08:00
Vinnie Falco
bfb500110b Spelling 2019-02-02 13:19:30 -08:00
Vinnie Falco
a142969c5d Qualify buffer_copy, don't qualify buffer_size:
fix #1416

* Calls to buffer_copy are qualified as net::buffer_copy
* Calls to buffer_size are made unqualified, permitting
  argument dependent lookup to take effect.
2019-02-02 13:01:27 -08:00
Vinnie Falco
5b0b218d96 test::stream maintains a handler work guard
fix #1418
2019-02-02 10:30:12 -08:00
Peter Dimov
e0db595760 Faster http::string_to_field:
* Optimize hash calculation and equality for field strings

Experiments show the digest and equality functions taking the
most time. Optimizing L1 cache usage did not show significant
improvements.
2019-02-02 10:04:43 -08:00
Vinnie Falco
be29ce4c1e
Set version to 208 2019-02-01 15:14:14 -08:00
Vinnie Falco
49deee4a69 Add close_socket, beast_close_socket customization:
This algorithm allows a socket-like object to be closed in
a generic context. The customization point enables user-defined
types to define the close algorithm to use with `close_socket`.
2019-02-01 14:05:07 -08:00
Vinnie Falco
6a658b5c3a Remove lowest_layer, add get_lowest_layer (API Change):
fix #1417

* New get_lowest_layer free function works for any object
* New lowest_layer_type trait works for any object
* New examples and documentation on layered streams

API Changes:

* The member function lowest_layer is removed from all
  types provided by the library:

Actions Required:

* Call the free function get_lowest_layer instead of
  member lowest_layer.
2019-02-01 04:31:13 -08:00
Vinnie Falco
5361224a7d
Set version to 207 2019-01-23 04:39:53 -08:00
Vinnie Falco
1da611fa04 Pass the correct handler in basic_timeout_stream 2019-01-22 21:25:06 -08:00
Vinnie Falco
60c96104ec lowest_layer is removed (API Change):
The nested function lowest_layer and nested type lowest_layer_type
are removed from all stream layers.

Actions Required:

* Remove lowest_layer and lowest_layer_type from user-defined streams.
* Use the get_lowest_layer free function and the lowest_layer_type trait
  as needed.
2019-01-22 04:59:07 -08:00
Vinnie Falco
29f838b9d9 Remove unused enum 2019-01-21 18:58:08 -08:00
Vinnie Falco
2dcb11b89a
Set version to 206 2019-01-21 12:13:08 -08:00
Vinnie Falco
9a8e22950f websocket stream uses shared_ptr<impl_type> 2019-01-21 08:44:14 -08:00
Vinnie Falco
944b5dcda7 Clear error codes idiomatically 2019-01-20 09:50:43 -08:00
Vinnie Falco
9ea70bfbe5
Set version to 205 2019-01-20 07:05:21 -08:00
Vinnie Falco
4d0849595c Add detail/prng.hpp 2019-01-20 07:05:16 -08:00
Vinnie Falco
785c0ad93d Add detail/soft_mutex.hpp 2019-01-20 07:05:16 -08:00
Vinnie Falco
949fa967b9
Set version to 204 2019-01-17 17:20:49 -08:00
Vinnie Falco
03bf9144b7 Unit test macros use the global suite
fix #1411
2019-01-17 17:19:00 -08:00
Vinnie Falco
72ea142c5c Add basic_timeout_stream:
This stream wrapper replaces basic_stream_socket and
provides just the timeout functionality.

* basic_stream_socket is removed
2019-01-17 17:18:31 -08:00
Vinnie Falco
cfd9b46014
Set version to 203 2019-01-15 11:45:35 -08:00
Vinnie Falco
ca5a70a3cd parse_until is not static
fix #1393
2019-01-15 11:42:05 -08:00
Vinnie Falco
cf2dbdc0be Use new saved_handler in websocket 2019-01-15 11:42:05 -08:00
Vinnie Falco
3092e43879 saved_handler is a public interface:
This container allows completion handlers to be safely
suspended and resumed later, or destroyed.
2019-01-12 18:42:32 -08:00
Vinnie Falco
3595eb2221 Update networking refresher doc 2019-01-12 13:11:00 -08:00
Vinnie Falco
0822e1bb5e
Set version to 202 2019-01-11 20:07:02 -08:00
Vinnie Falco
3599ccb09a Add tests for async_op_base 2019-01-11 20:06:56 -08:00
Vinnie Falco
b4c63028e2 Add tests for bind_back_handler 2019-01-09 18:24:34 -08:00
Vinnie Falco
5292df6e72 async_op_base is a public interface:
This utility simplifies the authoring of composed
operations, see documentation for details.
2019-01-09 09:54:53 -08:00
Vinnie Falco
b46953f1bd Use async_op_base:
Composed operation implementations use async_op_base and
stable_async_op_base, to eliminate redundant boilerplate.
2019-01-09 09:54:42 -08:00
Vinnie Falco
9e44ae7be5 Refactor async_op_base:
* Renamed to async_op_base (was operation_base)
* Executor1 is explicit
* Add stable_async_op_base refinement
2019-01-09 09:54:15 -08:00
Vinnie Falco
522ca9e78b Tidy up basic_stream_socket docs 2019-01-09 09:54:05 -08:00
Vinnie Falco
8b72b4d407
Set version to 201 2018-12-30 16:59:54 -08:00
Vinnie Falco
6caca92f0e New stream_socket:
This I/O object wraps an ordinary socket and provides a built-in
timeout and optional bandwidth rate-limiting facility.

Added class template basic_stream_socket

* Meets the requirements of AsyncReadStream and AsyncWriteStream

* Partially supports P1322R0:
  "Networking TS enhancement to enable custom I/O executors"
  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1322r0.html

  A strand or other io_context-compatible executor may be
  chosen to use for all asynchronous stream operations.

* Supports independent timeouts on logical operations:
  connect, read, write, or both read and write.

* Provides an option for a configurable rate limit
  limit on the maximum rates of reading or writing.

* The previous experimental implementation,
  `timeout_socket` and related types, is removed.

* stream_socket is an alias for basic_stream_socket which
  uses `net::ip::tcp` as its protocol.
2018-12-30 16:49:09 -08:00
Vinnie Falco
2d3912751b Add core errors and conditions 2018-12-30 12:51:34 -08:00
Vinnie Falco
7caa0b8132 Tidy up some buffer sequence iterators 2018-12-23 20:19:43 -08:00
Vinnie Falco
92e598ade3 Add bind_back_handler
fix #1384
2018-12-21 06:35:07 -08:00
Vinnie Falco
e7b8cc73a5 Decay bound arguments in handler wrapper parameters:
fix #1365

To reduce instantiations, the list of template parameters
to the bind and bind_front handler wrappers are decayed before
naming the class template.
2018-12-20 01:01:33 -08:00
Vinnie Falco
f00237cb35
Set version to 200 2018-12-19 22:06:53 -08:00
Vinnie Falco
c4f4087888 Add buffers_range_ref (replaces reference_wrapper parameter) 2018-12-19 21:51:49 -08:00
Vinnie Falco
9ccd8a754a HTTP tidying 2018-12-19 21:51:49 -08:00
Vinnie Falco
61a35bd936 Remove file_mode::append_new (API Change):
* Tidying
* Increase test coverage
* Fix file_mode::append_existing

API Changes:

* file_mode::append_new is removed, as it makes no sense

Actions Required:

* Replace file_mode::append_new with file_mode::append
  or file_mode::append_existing instead of file_mode::append_new
2018-12-19 21:51:49 -08:00
Vinnie Falco
321af29d25 Refactor static_buffer:
* Improve tests and coverage
* Add static_buffer_base::clear
* Use BOOST_BEAST_DECL
2018-12-19 20:59:20 -08:00
Vinnie Falco
0006ab3b2b make_printable replaces buffers rename (API Change):
* The function buffers is deprecated, use the new
  function make_printable as the replacement.

Actions Required:

* Replace call sites to use make_printable instead of buffers,
  and also include make_printable.hpp instead of ostream.hpp.
2018-12-19 20:59:20 -08:00
Vinnie Falco
991bae8486 Refactor ostream:
* Fix overflow
* Better calculation for prepare, no read_size
* Improve tests and code coverage
2018-12-19 20:59:20 -08:00
Vinnie Falco
594a92e515 Tidy up multi_buffer:
* Improved tests
* Refactor some declaration material
* basic_multi_buffer::clear is public

and

* Fix flat_buffer::reserve
* flat_buffer::clear is public
2018-12-19 20:59:20 -08:00
Vinnie Falco
74293fb8a5 Test self copy, self move for dynamic buffers:
* Swap
* Copy assignment to self
* Move assignment to self
2018-12-19 20:59:20 -08:00
Vinnie Falco
81e3642fa7 Fix ostream prepare calculation for low limits:
This resolves an issue where the ostream could try to
exceeed the configured maximum size of a dynamic buffer
when the maximum is set to a very low number.
2018-12-19 20:59:20 -08:00
Vinnie Falco
b367776c37 Fixes and tidying for flat_buffer:
* Fix reserve() size calculation
* Improved test coverage
2018-12-19 20:59:20 -08:00
Vinnie Falco
477e5a6f98 Refactor buffers_suffix:
* Tidy up tests
* Increase code coverage
* Remove unnecessary move special members
* Correct behavior for default constructed iterators
2018-12-19 20:59:20 -08:00
Vinnie Falco
9d27f2659f Optimize for size on buffers_cat preconditions:
When BOOST_BEAST_TESTS is not defined, violations of
buffers_cat preconditions will assert instead of throwing
exceptions. This reduces the size of the emitted code
and improves performance.
2018-12-19 20:59:20 -08:00
Vinnie Falco
fa14af2696 Use new buffer traits, remove old unused traits 2018-12-19 20:59:20 -08:00
Vinnie Falco
8f1faababd Add buffers_iterator_type trait 2018-12-19 20:59:20 -08:00
Vinnie Falco
1998bad89d Add const and mutable buffer sequence traits:
* Add variadic is_const_buffer_sequence
* Add variadic is_mutable_buffer_sequence
* buffers_type is now variadic
2018-12-19 20:59:20 -08:00
Vinnie Falco
4cfe860b93 Refactor buffers_prefix:
* Tidy up tests
* Increase code coverage
* Correct behavior for default constructed iterators
2018-12-19 20:59:20 -08:00