Commit Graph
290 Commits
Author SHA1 Message Date
Vinnie Falco 32bbd38387 Support Concepts for completion token params 2019-10-31 06:47:22 -07:00
Vinnie Falco 9f468ec1c1 Use automatically deduced return types for all async operations:
C++14 or later is required to support completion tokens that use
per-operation return type deduction. For C++11, a completion
token's async_result specialisation must still provide the nested
typedef `return_type`.
2019-10-31 06:47:22 -07:00
Vinnie Falco d64e5f718c Add basic_stream::rebind_executor 2019-10-31 06:26:12 -07:00
Vinnie Falco 7cc8759261 Async init-fns use the executor's default token 2019-10-31 05:47:05 -07:00
Vinnie Falco 087bcc4ef5 Use the executor type in basic_stream timer
fix #1589
2019-10-15 15:48:42 -07:00
Vinnie Falco 0f932d589b Silence unused variables 2019-10-04 18:57:48 -07:00
Vinnie Falco 8e7ef7aa0f Fix doc typo 2019-10-03 02:56:55 -07:00
Vinnie Falco c5d8c7b64c Multiple I/O of the same type is not supported
fix #1682
2019-08-29 10:55:47 -07:00
Mike Ellery e681f9d212 Add default dtors to satisfy -Wnon-virtual-dtor
close #1664
2019-08-29 10:52:07 -07:00
Vinnie Falco db2f0052ff basic_stream dtor cannot throw
fix #1688
2019-08-28 16:02:31 -07:00
Aurelien Chartier 70f232f6dd Fix signed/unsigned mismatch in file_stdio::seek
fix #1687
2019-08-28 16:02:31 -07:00
Damian Jarek dc6602b5d3 Fix header-only compilation errors in some configurations
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-08 20:28:58 +02:00
Damian Jarek 0b04c82e2b Fix unused variable warning in multi_buffer
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-08 20:28:58 +02:00
Damian Jarek 261193fc9c Remove unused functions in impl/static_string.hpp
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-08 20:28:58 +02:00
Vinnie Falco 89c922e02b Fix deallocate in multi_buffer 2019-07-03 17:21:19 -07:00
Vinnie Falco 9e0564044f Tidy up buffers_range 2019-07-01 12:49:03 -07:00
Vinnie Falco ce1c6d3222 Fix multi_buffer allocation alignment 2019-07-01 12:49:03 -07:00
Damian Jarek a7e932b13c Remove redundant includes in websocket
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-01 19:43:43 +02:00
Damian Jarek 9847fd6e69 Remove redundant includes in core
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-24 11:07:41 -07:00
Damian Jarek 7e8af58307 Move detail::base64 helpers to tests
These functions were only used in tests.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-24 11:07:41 -07:00
Damian Jarek b8b04f8f39 Cleanup transitive includes in beast/core/detail/type_traits.hpp
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-24 11:07:41 -07:00
Damian Jarek 1a720c8354 Qualify calls to beast::iequals in basic_parser.ipp
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-23 16:58:15 +02:00
Vinnie Falco 61721544f0 Style tidying 2019-06-19 11:37:20 -07:00
Damian Jarek 214fa12f21 Use beast::read_size in detail::read
This allows using the read size hint and deduplicates a fairly
complicated piece of code.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:36 +02:00
Damian Jarek f10dc38ae6 Replace uses of net::coroutine with asio::coroutine
`asio::coroutine` is an extension, which is not part of
the Networking TS, so the `net` alias is not appropriate in this case.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:35 +02:00
Damian Jarek a0d5baf22a Improve performance of http::string_to_verb
`operator==` performs better than the hand-written comparison routine.

fix #1636

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:35 +02:00
Damian Jarek da61b4e52c Move char_buffer into a separate file
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:34 +02:00
Damian Jarek edca7dd18e Remove redundant use of asio::coroutine in flat_stream
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:34 +02:00
Damian Jarek d5f5f1467f Enable split compilation in http::basic_fields
Moved functions,that are independent of template argument, into
an *.ipp file.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:33 +02:00
Vinnie Falco e9781b225e Fix flat_buffer copy members
fix #1621
2019-05-29 21:14:14 +02:00
Damian Jarek 8198571555 Use if statement in basic_stream:
An `if` statement is cheaper to instantiate without additional runtime
cost when optimizations are enabled.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-27 22:15:49 +02:00
Damian Jarek 3fa468f840 Add 1-element specialization for buffers_cat
`buffers_cat` now supports 1 or more buffers sequences.

Close #1280

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-20 15:33:43 +02:00
Damian Jarek 9909fada29 allocator_traits::construct is used for user-defined types:
It should only be called when constructing a user-provided type.

Close #1332

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-20 15:29:21 +02:00
Damian Jarek e98fc22bec Remove redundant template in service_base
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-19 22:32:43 +02:00
Damian Jarek 0f77bd7149 Remove the use of bind_executor in basic_stream:
Use the executor hook instead of `bind_executor` to avoid template
instantiations.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-19 22:32:43 +02:00
Vinnie Falco e53ccf251c Fix min/max on MSVC
fix #1578
2019-04-19 11:36:00 -07:00
Vinnie Falco 0a334d96d1 member get_executor const-correctness
fix #1559
2019-04-19 11:18:55 -07:00
Vinnie Falco db118f4dc4 Fix async_detect_ssl handler type
close #1569
2019-04-18 18:22:24 -07:00
Damian Jarek 2cfe3ba1b8 Replace static_string in parser
close #1574

This change yields a modest performance improment of 1-2% by replacing
the exception-based handling of buffer overflow with one based on
regular conditional checks.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-04-15 08:21:48 -07:00
Damian Jarek 8703038e37 launder pointers:
close #1570

`std::launder` must be used whenever placement-new of an unknown type
is performed and the result of the placement-new expression is discarded.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-04-15 08:21:48 -07:00
Simon Ebner 7e78863074 Don't use a moved-from handler:
close #1560

* Obtain the executor from the handler prior
  to transferring ownership.
2019-04-06 13:23:12 -07:00
Damian Jarek ce986118f8 Fix async_base immediate completion
`complete(false, ...)` used the wrong executor when an async operation
completed immediately, potentially executing the completion handler on
the IO executor in some cases.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-04-05 05:08:31 -07:00
Vinnie Falco 27c572fbfa Tidy up declval in some traits 2019-04-01 17:35:44 -07:00
Vinnie Falco 4f464ccaeb Tidy up file_stdio for VS2015 2019-03-30 14:14:59 -07:00
Denis Glazachev 24ccdd243a Fix some typos 2019-03-30 11:12:04 -07:00
Vinnie Falco 965c21615a MSVC uses ::fopen_s 2019-03-29 20:42:44 -07:00
Vinnie Falco 61fcd9ef6f Refactor Jamfiles to work with release layout 2019-03-24 09:18:02 -07:00
Gregor Jasny 0033b7c1e4 Android: Use compiler pre-defined __ANDROID__
The ANDROID define us usually originationg from he build system
(like CMake, ndk-build, etc.). But some buildsystems like Bazel
do not set it which brakes Android platform detection.

Better use __ANDROID__ (like boost predef does) which is
predefined by the compiler if targeting Android.
2019-03-14 09:55:22 -07:00
Vinnie Falco fdc83c981b Fix basic_stream lowest_layer for ssl 2019-03-12 18:58:24 -07:00
Vinnie Falco 554701845c Fix close_socket for net::basic_socket changes 2019-03-12 16:20:36 -07:00