Mohammad Nejati
848e20680f
Fix cancellation in teardown_tcp_op
2024-08-06 15:42:40 +03:30
Mohammad Nejati
5f5507f647
Initiating functions no longer perform mutating operations
...
Using `asio::deferred` as a completion token defers the initiation of
operations and creates a lazy operation which might even be discarded.
We need to move mutating operations to the initiator function objects or
the constructor of operation objects, which are guaranteed to run when
the deferred operation is launched.
2024-08-06 15:42:40 +03:30
Mohammad Nejati
aabd5b51d3
net::prepend is replaced with net::append
2024-07-07 14:58:49 +03:30
Mohammad Nejati
75812db90a
get_executor() works on initiation objects
...
This is required for the new `asio::cancel_at` and `asio::cancel_after`
completion token adapters to work.
2024-07-04 19:49:41 +03:30
Christopher Kohlhoff
1a2b85b7a4
Fix overloads that are ambiguous when using default completion tokens
2024-06-27 16:33:10 +03:30
Mohammad Nejati
74d28c030d
Partial writes don't cause bytes_transferred underflow
...
Fixes #2880
2024-06-06 17:58:25 +03:30
Mohammad Nejati
767397e0c1
read_size_hint does not exceed read_message_max
...
Fixes #2879
2024-06-06 00:49:08 +03:30
Mohammad Nejati
9e16754dd5
Add non-allocating overload for error category message function
...
Fixes #2646
2024-01-03 18:21:52 +03:30
Mohammad
0d1e2d64f8
Replace beast::bind_front_handler uses with asio::prepend
2023-12-30 08:47:32 +03:30
Klemens Morgenstern
dd875463ff
immediate_executor is supported. ( #2672 )
2023-10-13 05:33:23 -03:00
Klemens Morgenstern
2952b670d8
Handler requirements of ping/pong are correct.
...
Closes #2713
2023-08-18 18:45:39 +08:00
Michiel De Witte
a4718ee87b
change upgrade to Upgrade as connection header value
2023-05-12 18:46:55 +08:00
Klemens Morgenstern
aef9c88c9d
error categories use numeric id
2023-01-23 17:48:28 +08:00
Klemens
334b9871be
Fixed timer usage inside basic_stream.
...
Closes #2602 .
2022-12-24 09:40:08 +08:00
Klemens Morgenstern
48f82ac817
Switched self-posting to the io-object's executor.
...
This is a conceptual change in the recent asio version that is reflected in any_completion_handler.
2022-12-20 14:45:26 +08:00
Klemens Morgenstern
1fc340713c
beast support default completion & rebind.
...
buffers_generator uses default_completion.
websocket::stream has a rebinding constructor.
ssl_stream has a rebind_executor member.
basic_stream has rebinding constructor.
2022-10-30 00:13:54 +08:00
Klemens
3ebff60b1a
beast support per-op cancellation
...
- websocket supports cancellation.
- Iterating test for ws cancellation.
- Only terminal cancellation is forwarded by default.
- basic_stream supports cancellation.
- supported cancellation is documented.
- http cancellation additions.
- Added cancellation_slot tests to http, utils and saved_handler.
- Added post to write.cpp, to avoid SIGSEV in test.
- Refresher describes cancellation in more detail.
2022-10-27 22:56:19 +08:00
Klemens Morgenstern
f4d1936bb2
error_codes use source_location.
2022-10-26 00:06:01 +08:00
Klemens Morgenstern
b0c49748a2
Support expect continue in upgrade.
...
Closes #264 .
2022-10-13 09:26:08 +08:00
alandefreitas
bd69638e9d
per-message compression options
...
fix #226 , #227
2022-10-03 09:25:31 +08:00
Richard Hodges
d86a61f458
Remove incorrect ASSERT in websocket read
...
fix #2264
2022-09-01 15:46:12 +02:00
Glen Fernandes
24275ac0c6
Use static_string from Boost.StaticString
2022-04-17 12:30:52 -04:00
Richard Hodges
b5a94db2a5
WebSocket handshake response is deterministic on failure:
...
Add test for websocket handshake failure HTTP response
fix #2364
close #2365
2021-12-22 12:00:17 +01:00
dmorilha-twilio
8283a7df3f
Fix case where inflated content is larger than out buffer
...
closes #2191
2021-03-25 14:47:10 +01:00
KnoerleMan
fc673aa09b
Fix compiler warning in WebSocket async shutdown:
...
Credit: https://github.com/KnoerleMan
closes 2174
2021-03-01 19:50:29 +01:00
Christopher Kohlhoff
760b875c3b
Limit the number of net::async_write instantiations by using a common buffer sequence type
...
closes #2169
2021-03-01 19:50:29 +01:00
Richard Hodges
ccd0f8822a
Websocket SSL teardown also tears down underlying TCP
...
fixes #2023
2020-08-28 13:26:22 +02:00
Richard Hodges
bc1fc65d7e
Add handler tracking locations to websocket
2020-08-28 13:26:22 +02:00
Richard Hodges
8c21c80f43
Add handler tracking locations to tcp teardown
2020-08-28 13:26:21 +02:00
Richard Hodges
2f6bf76cb4
Eliminate spurious uninitialised variable warning in detect_ssl
2020-08-28 13:26:21 +02:00
Richard Hodges
719f1a5505
Fix websocket stream when using net.ts executor type
2020-07-04 07:35:19 +02:00
Richard Hodges
060f59685c
Support BOOST_ASIO_NO_TS_EXECUTORS
2020-07-04 07:35:14 +02:00
Richard Hodges
24d0b1f7bd
Remove accept_ex and handshake_ex (API Change):
...
API Changes:
* The following deprecated functions have been removed:
- websocket::async_accept_ex
- websocket::async_handshake_ex
- websocket::accept_ex
- websocket::handshake_ex
Programs still using these names should be refactored to use the `decorator` feature and
the remaining handshake and accept functions.
refs #1934
2020-06-01 18:52:39 +02:00
Richard Hodges
27ce598bad
No automatic User-Agent in WebSocket
...
fixes #1935
2020-05-04 18:47:06 +02:00
Richard Hodges
0cc3acdb83
Fix assert in websocket
...
fixes #1931
2020-05-04 10:58:26 +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
c08e636711
Refactor websocket read:
...
Some readability improvements
ref #1618
2020-03-17 16:02:32 +01:00
Cristian Morales Vega
26a156e300
Fix async_close error code when async_read times out
...
close #1754
2019-11-02 08:26:23 -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
bafce23853
Squelch spurious websocket timer assert
2019-10-09 12:00:22 -07:00
Vinnie Falco
9f77867f0a
Fix outgoing websocket message compression
...
fix #1666
2019-07-29 10:35:41 -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
fea681b459
Deduplicate websocket::read_size_hint definition
...
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-06-25 04:21:52 +02: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
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
dcf3db7f83
Remove redundant use of static_string
...
This avoids an instantiation and copy of the data when adding the Server
header field.
Close #1613
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-05-19 22:32:43 +02:00
Vinnie Falco
77f3bb0764
Fix moved-from executor in idle ping timeout
...
fix #1599
2019-05-04 18:47:44 -07:00
Damian Jarek
dbadb79a75
Silence gcc-8 warning:
...
The warning was caused by a false positive triggered by boost::optional.
Reference:
https://github.com/boostorg/optional/issues/72
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-05-04 17:30:25 +02:00
Vinnie Falco
0a334d96d1
member get_executor const-correctness
...
fix #1559
2019-04-19 11:18:55 -07:00
Damian Jarek
bc9f63f10d
Cleanup endianness conversions:
...
close #1544
- Use Boost.Endian conversions functions.
- Remove existing private conversion functions.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-04-08 17:14:04 -07:00