Commit Graph
1465 Commits
Author SHA1 Message Date
Vinnie Falco 522ca9e78b Tidy up basic_stream_socket docs 2019-01-09 09:54:05 -08:00
Vinnie Falco 0aa35d7266 Update coverage badge images 2019-01-09 09:53:53 -08:00
Glen Fernandes 1d5a18a0a1 Use cxxstd instead of cxxflags 2019-01-09 09:53:24 -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 25f144f936 Rename test source files 2018-12-26 17:27:57 -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 cbd5e76e92 Add type_traits tests 2018-12-19 21:51:49 -08:00
Vinnie Falco 002861bbc8 Adjust static_asio lib options in Jamfile 2018-12-19 21:51:49 -08:00
Vinnie Falco 9ccd8a754a HTTP tidying 2018-12-19 21:51:49 -08:00
Tocic 3a3f9c459e Fix typo 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 05d22802ec Tidy up flat_static_buffer tests 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
Vinnie Falco 719fe66b77 Fix and refactor buffers_cat:
Elements of zero size are correctly skipped during iteration.

* Tidy up tests
* Increase code coverage
* Remove move special members
* Correct behavior for default constructed iterators
2018-12-19 20:59:20 -08:00
Vinnie Falco ca728e4022 Refactor buffers_range:
* Add tests
* Increase code coverage
* Correct behavior for default constructed iterators
2018-12-19 20:59:20 -08:00
Vinnie Falco 117dda7b31 Refactor buffers_adaptor (API Change):
* Tidy up tests
* Increase code coverage
* Remove move special members
* Correct behavior for default constructed iterators

API Changes:

* buffers_adaptor is renamed (was buffers_adapter)

Actions Required:

* Replace buffers_adapter.hpp with buffers_adaptor.hpp, and
  replace buffers_adapter with buffers_adaptor. Or, define
  BOOST_BEAST_ALLOW_DEPRECATED
2018-12-19 20:59:20 -08:00
Vinnie Falco c1d7a83af2 buffers_cat fixes and coverage:
* Fix operator== for default constructed iterators
* More tests and code coverage
2018-12-19 20:59:20 -08:00
Vinnie Falco ad2cdf0281 Tidy up msvc-14 workaround in multi_buffer 2018-12-19 20:59:20 -08:00
Vinnie Falco 49c5f7c30f Don't include OpenSSL for core snippets 2018-12-19 20:59:20 -08:00
Vinnie Falco cf06a8dd6a Adjust CI scripts for superproject changes 2018-12-19 20:59:19 -08:00
Vinnie Falco c4813a5ac7 Set version to 199 2018-12-14 05:39:14 -08:00
Vinnie Falco b0f86ea001 Fix Appveyor badge links 2018-12-14 05:37:41 -08:00
Vinnie Falco e17a92f2a8 Workarounds for msvc-14 2018-12-13 19:38:44 -08:00
Vinnie Falco 926065d273 Set version to 198 2018-12-12 19:32:26 -08:00
Vinnie Falco d0183da6d0 Tidy up buffers_prefix and tests 2018-12-12 19:32:22 -08:00
Vinnie Falco f0cbf8276e Tidy up bind_handler tests 2018-12-12 19:32:22 -08:00
Vinnie Falco 2afe929bb7 Fix bind_handler, bind_front_handler:
This tidies up small corner cases and bugs with
the bind_handler and bind_front_handler wrappers:

* Legacy allocation hooks are deleted
* Fixes for bind_front_handler specializations
* Decay bound arguments first, to reduce template instantiations
* Proper moving and forwarding of bound arguments and call parameters
2018-12-12 19:32:22 -08:00
Vinnie Falco 120d5481e2 Tidy up core files 2018-12-12 19:32:22 -08:00
Vinnie Falco d8a23776d4 Tidy up experimental files 2018-12-12 19:32:22 -08:00
Vinnie Falco 0a583a331d Add buffer_traits.hpp, buffers_type 2018-12-12 19:32:22 -08:00
Vinnie Falco b6eb988694 saved_handler maintains a work_guard (websocket):
* Tidy up and comment asserts

* `pausation` is renamed to saved_handler

* A work guard on the handler's associated executor
  is maintained for the lifetime of the store handler.
2018-12-12 19:32:22 -08:00
Vinnie Falco 8ea282ee5e flat_static_buffer improvements (API Change):
* Revise documentation
* Specify exception safety
* Mark more functions noexcept

API Changes:

* flat_static_buffer::reset is deprecated

Actions Required:

* Replace calls to flat_static_buffer::reset with
  flat_static_buffer::clear
2018-12-12 19:32:22 -08:00