1313 Commits

Author SHA1 Message Date
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