Commit Graph

283 Commits

Author SHA1 Message Date
Mohammad Nejati a9121c259b boost_json links` statically 2024-09-01 12:40:33 +03:30
René Ferdinand Rivera Morell 2bda7870fe Add support for modular build structure. (#2905)
* Use beast exclusive valgrind feature.

* Make the library modular usable.

* Switch to library requirements instead of source. As source puts extra source in install targets.

* Add Beast root dir for includes. As some tests refer to files relative to that.

* Replace relative docca refs with project based.

* Avoid mtuliple openssl configurations.

* Always declare openssl. If it's empty and duplicate it will be ignored.

* Add missing import-search for cconfig/predef checks.

* Add requires-b2 check to top-level build file.

* Bump B2 require to 5.2

* Update copyright dates.

* Move inter-lib dependencies to a project variable and into the build targets.

* Update build deps.

* Update build deps.

* The http/client/body example uses the source header from json instead of the linked library.
2024-09-01 11:26:02 +03:30
Mohammad Nejati 375b0b5ee8 server-flex-awaitable: connections get their own strand 2024-07-08 12:13:16 +03:30
Mohammad Nejati ff5672ec07 awaitable examples are simplified
No need for `rebind_executor` as `asio::deferred` is now the default completion token.
2024-07-07 14:58:49 +03:30
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