Mohammad Nejati
03b792faac
net::ssl::stream is canonical in examples
...
We no longer need to use beast::ssl_stream to improve write performance, as
Asio now linearizes scatter/gather I/O in ssl::stream:
https://github.com/chriskohlhoff/asio/commit/17637a48ccbfa2f63941d8393a7c8316a8df4a79
2024-05-31 16:45:52 +03:30
Mohammad Nejati
bd804b6520
ssl_stream does not use flat_stream
...
We no longer need to use flat_stream to improve write performance, as
Asio now linearizes scatter/gather I/O in ssl::stream:
https://github.com/chriskohlhoff/asio/commit/17637a48ccbfa2f63941d8393a7c8316a8df4a79
2024-05-31 16:45:52 +03:30
Mohammad Nejati
6dd3cf7ab1
std::bind is superfluous in some examples
2024-05-31 16:45:52 +03:30
Mohammad Nejati
9bf2184b33
Fix error handling in SSL shutdown operations in examples
2024-05-28 23:39:48 +03:30
Mohammad Nejati
dc154bc0bd
Update host string after SSL_set_tlsext_host_name
2024-02-14 20:03:10 +03:30
Mohammad Nejati
5998feda44
Fix write loop in advanced server examples
...
Fixes #2739
2024-01-02 21:28:58 +03:30
Anefu
b1779ced98
fix: unhandled connection closing in websocker_server_awaitable
2023-12-24 09:48:50 +03:30
Anefu
f05413912e
fix: unhandled connection closing in websocker_server_awaitable
2023-12-24 09:48:50 +03:30
Klemens Morgenstern
ba25a117a7
server-flex-awaitable example resets parser.
...
Closes #2715 .
2023-08-18 11:40:20 +08:00
slowriot
fd18cfa242
Remove unused failure reporting code
2023-05-12 18:46:36 +08:00
Klemens
0e5cf9ff79
awaitable-ssl example belongs to right directory
...
Closes #2654
2023-03-22 16:11:06 +08:00
Klemens Morgenstern
2bd65b27e1
awaitable server close fix.
...
Closes #2637
2023-02-20 13:58:07 +08:00
Klemens
99bceb5bff
examples & tests use context instead of coroutine.
2023-02-02 23:27:49 +08:00
Klemens
1841a592d6
Minimalistic method examples.
2023-02-02 15:05:11 +08:00
Klemens Morgenstern
947b225c9e
No unused function in awaitable examples. ( #2605 )
...
* No unused function in awaitable examples.
* Beast has an awaitable-ssl example.
Closes #2604 .
2023-01-24 09:55:05 +08:00
Klemens
bfd5e55093
advanced_server_flex_awaitable doesn't rely on transitive include.
2023-01-04 08:44:00 +08:00
Greg Glover
6e1eb76b1d
typo in the json client comment
2022-12-07 13:42:03 +08:00
Klemens Morgenstern
09bfca1fa1
awaitable examples.
...
Closes #2104 .
2022-10-30 00:13:54 +08:00
Klemens Morgenstern
b0c49748a2
Support expect continue in upgrade.
...
Closes #264 .
2022-10-13 09:26:08 +08:00
Klemens
4f5ec46002
Exampe CMakeLists.txt is fixed.
2022-10-04 09:17:56 +08:00
Klemens Morgenstern
12c2d14ebc
streaming JSON body is an example
2022-10-03 09:53:05 +08:00
Utsav Munendra
34c4647caf
Correct common name of example server certificate
2022-06-21 20:39:25 -03:00
sehe
87ddb16151
Examples use http::message_generator
2022-05-21 22:12:13 -07:00
Daniel Engelke
9201210d5e
fields_alloc does not leak
...
fix #2431 , close #2432
2022-05-21 18:15:33 -07:00
oerol
90e37ae40b
return statement to exit reading loop
...
Merges PR#2414
I used this example to start building my WebSocket application, however, I noticed that upon removing the echoing in the on_read method, the server repeatedly throws errors without exiting the method.
You can recreate this problem by replacing the async_write with do_write and cause any error (i.e. client reloads the page).
Adding a return statement here would make debugging for future changes much easier and it wouldn't harm the existing echoing in any way.
2022-04-26 23:41:25 +02:00
ShuangLiu1992
b16005a456
Fix TLS SNI handling in websocket_client_async_ssl example:
...
Original commit message
fixed an error in websocket_client_async_ssl
close #2315
in this example host_ string should be updated after SSL_set_tlsext_host_name just like the synced version, otherwise this would cause a handshake error
2021-11-03 19:14:50 +01:00
Hreniuc Cristian-Alexandru
2f4506dc37
Fix accept error handling in http_server_async example
...
close #2319
2021-11-03 18:39:42 +01:00
mxp
01cd68c9a4
Add example of reading large response body
...
closes #2240
2021-05-26 12:12:45 +02:00
Richard Hodges
b1da28625e
Update example root certificates
...
fixes #2236
2021-05-22 16:46:23 +02:00
Richard Hodges
70bddce07f
Fix warning in http-server-fast
2021-03-16 10:03:25 +01:00
Richard Hodges
fae4c0e3c2
Parenthesise all uses of min() and max()
2021-03-16 10:02:47 +01:00
Georg Gast
b07edea9d7
Fix logic error in advance_server_flex
...
fixes #2063
closes #2064
2020-08-28 13:26:22 +02:00
Richard Hodges
a35cd32005
Update WebSocket examples to set TLS SNI
2020-08-28 13:26:22 +02:00
Richard Hodges
2efb729c53
Fix compile errors under Clang 3.4
...
fixes #2030
closes #2031
2020-07-24 13:59:49 +02:00
Richard Hodges
4f913cab63
Fix portability bug in websocket server sync example
...
fixes #2032
closes #2034
2020-07-24 13:59:46 +02:00
Richard Hodges
f036077547
Fix race in http-crawl
2020-07-07 18:49:35 +02:00
Richard Hodges
a9b5bf343d
Examples require tracked
2020-07-04 08:22:57 +02:00
Richard Hodges
de1e63c597
Fix style errors
2020-07-04 08:12:10 +02:00
Richard Hodges
060f59685c
Support BOOST_ASIO_NO_TS_EXECUTORS
2020-07-04 07:35:14 +02:00
Christopher Kohlhoff
55302a3f8f
New name for polymorphic executor. Trait for detecting new executors
2020-07-04 07:34:34 +02:00
Richard Hodges
14c3d50b57
Deprecate string_param (API Change):
...
API Changes:
`string_param`, which was previously the argument type when setting field values
has been replaced by `string_view`. Because of this, it is no longer possible to
set message field values directly as integrals.
Users are required to convert numeric arguments to a string type prior to calling
`fields::set` et. al.
Beast provides the non-allocating `to_static_string()` function for this purpose.
To set Content-Length field manually, call `message::content_length`.
fixes #1956
2020-06-12 17:33:20 +02:00
Richard Hodges
c397227eb5
Fix Host header in websocket examples
...
closes #1633
2020-04-08 15:56:39 +02:00
Richard Hodges
a21c1b7298
Fix examples to dispatch to strand
...
fix #1852
2020-03-17 16:04:21 +01:00
Richard Hodges
7ce6980042
fix strand use in example
...
fixes #1822
close #1823
2020-01-28 10:26:42 +01:00
Richard Hodges
b98c66a198
update DigiCert Global Root CA
2020-01-28 10:26:42 +01:00
Richard Hodges
35eaa441b9
Fix echo-op test
...
close #1789
2019-12-23 08:55:47 -08:00
Vinnie Falco
5521b91d8c
Tidy up cmake files and examples
2019-10-06 08:04:22 -07:00
Damian Jarek
3eebf420f0
Add async-ssl-system-executor http client example
...
This example websocket client application uses the `system_executor` to show
how to use it with the I/O objects in ASIO and Beast.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-10-06 07:52:13 -07:00
Damian Jarek
0f5d1edcd8
Fix data race in websocket examples
...
When using `websocket::stream`, the user has to take care to initiate
async operations within the associated strand.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-10-06 07:52:13 -07:00
Damian Jarek
3817fb4c94
Fix data race in http server examples
...
When using `beast::tcp_stream`, the user must make sure that async operations
are initiated from within the strand associated with the stream.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-10-06 07:52:13 -07:00