181 Commits

Author SHA1 Message Date
alandefreitas
46729654c1 Remove unused method
fix #2410
2022-06-22 15:07:45 -03:00
sehe
84e689c447 Add buffers_generator 2022-05-21 22:12:13 -07:00
Vinnie Falco
d3f24157b8 silence unreachable code warning 2022-05-21 22:12:13 -07:00
Glen Fernandes
24275ac0c6 Use static_string from Boost.StaticString 2022-04-17 12:30:52 -04:00
Richard Hodges
6bf9c882a4 Fix open append mode for file_posix 2021-12-10 17:24:03 +01:00
Richard Hodges
cf29ecdb63 Fix open append mode for file_win32 2021-12-10 17:22:50 +01:00
vm2mv
fb8f57a9e5 Fix file open with append/append_existing flag on Windows 2021-12-10 17:14:16 +01:00
Peter Dimov
b160673fd9 Fix clang-cl UTF8 path handling for file_stdio:
Check _MSVC_STL_VERSION in addition to BOOST_MSVC, to detect e.g. clang-cl using the MS STL

close #2353
refs #2081
2021-12-09 14:27:24 +01:00
Richard Hodges
5546086ca9 Remove use of POSIX-only constant
fixes #2233
refs #2231
2021-06-06 16:49:21 +02:00
Richard Hodges
1a5aea3d86 Fix MSVC build error 2021-03-15 23:12:00 +01:00
Nik Bougalis
33ea793020 Avoid the need for floating point arithmetic
closes #2124
2020-12-16 18:31:36 +01:00
Richard Hodges
7811f4c52f Fix assert when basic_stream used as underlying of ssl::stream with 0-length write
Fixes #2065
Closes #2078
2020-09-03 16:12:40 +02:00
Richard Hodges
d04ff199bb Fix unreachable code warning with MSVC
fixes #1582
closes #2035
2020-08-28 13:26:23 +02:00
Richard Hodges
982120c73e Fix file open with append_existing flag on posix
fixes #2011
closes #2027
2020-08-28 13:26:22 +02:00
Richard Hodges
932db900c3 Add handler tracking locations to flat_stream 2020-08-28 13:26:21 +02:00
Christopher Kohlhoff
5641d9498b Add handler tracking locations to basic_stream 2020-08-28 13:26:17 +02:00
Richard Hodges
060f59685c Support BOOST_ASIO_NO_TS_EXECUTORS 2020-07-04 07:35:14 +02:00
Christopher Kohlhoff
107b01ad24 Update bind_handler test to use standard executor form 2020-07-04 07:35:01 +02:00
Christopher Kohlhoff
22f2f5dcf4 Handler invoke and allocation hooks are deprecated 2020-07-04 07:34:21 +02:00
Richard Hodges
ae2b699e04 Fix max() compile error
closes #1980
2020-06-12 14:21:11 +02:00
Richard Hodges
60d4b54ec7 Remove handler_pointer (API Change):
API Changes:

handler_ptr has been removed. Users should use net::bind_handler and/or
bind_front_handler instead.

refs #1934
2020-06-02 12:57:43 +02:00
Richard Hodges
d7f1426f34 Fix basic_stream expires_after (API Change):
API Changes:

basic_stream::expires_after used to take a nanosecond duration type argument. This
required users on systems where the steady_clock::duration_type was less accurate
to explicity duration_cast when calling this function, making code non-portable.
The duration type is now that of the embedded steady_clock.

Many thanks to @spdw for noticing this and providing a patch.

fixes #1943
closes #1960
2020-05-29 17:16:32 +02:00
Richard Hodges
73097d3bd3 Fix std::FILE namespace qualification
refs #1944
closes #1962
2020-05-29 16:41:56 +02:00
Richard Hodges
438c238ab9 Comment move behaviour of basic_stream
resolves #1917
2020-05-04 10:58:54 +02:00
Richard Hodges
638e2d1244 Fix compilation errors with msvc /std:c++latest
fixes #1916
fixes #1925
2020-05-01 07:08:31 +02:00
Richard Hodges
d016ff52af Fix all async initiating functions with use_awaitable:
Add trait:
    is_completion_token_for

Fixes for
    buffered_read_stream

Add tests for
    basic_stream
    buffered_read_stream
    flat_stream
    http (all)
    websocket (all)

resolves #1920
2020-04-28 20:48:00 +02:00
Richard Hodges
570eafcd40 Ensure basic_stream::close will not throw
refs: #1875
2020-03-17 16:06:41 +01:00
Richard Hodges
fc5399722e Refactor static_buffer 2020-02-29 10:43:00 -08:00
Richard Hodges
69ef525d5c Refactor buffers_adaptor 2020-02-29 10:43:00 -08:00
Vinnie Falco
c340697171 Refactor multi_buffer 2020-02-29 10:42:30 -08:00
Richard Hodges
8a90ec0e3b flat_buffer shrink_to_fit never throws
fixes #1831
closes #1835
2020-02-04 19:41:50 +01:00
Richard Hodges
7701bf8738 moved-from container with unequal allocator will not be modified:
Affects:
- flat_buffer
- multi_buffer
- http::fields

fixes #1832
closes #1834
2020-02-04 18:36:53 +01:00
Mika Fischer
dfb44236e9 file_stdio supports unicode paths:
fix #793, close #1791, close #1793
2019-12-29 08:58:13 -08:00
Mika Fischer
f0c92f472c file_win32 supports UTF-8 paths:
fix #793, close #1791, close #1793

This brings file_win32 in sync with the documentation.
Previously, the path passed to open worked if encoded in the system
codepage (which is almost never UTF-8).
Now, the path must be encoded as UTF-8, as stated in the
documentation.

Adapt file tests so that for file_win32 all paths include a unicorn
character.
2019-12-29 08:56:02 -08: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
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
ce1c6d3222 Fix multi_buffer allocation alignment 2019-07-01 12:49:03 -07: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
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
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
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
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
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