All notable changes to this project will be documented in this file.
- Hardened and fixed regression in
CircularBufferwhen buffer full
- Full circle: Remove explicit cancellation token parameters introduced in 0.6
- Parameter removed from
WebSocketClientAsync,BufferedSocketAsync,ISocketAsync,HasSocketOperationsAsync,AsioSocket - Built-in default cancellation of couroutines sufficient, see updated example in examples/asio/ex_cancel_asio.cpp
- Parameter removed from
- Made async read/write operations cancellable by introducting a "cancellation slot" parameter
- Cancellation support implemented in
WebSocketClientAsync,BufferedSocketAsync,ISocketAsync,HasSocketOperationsAsync,AsioSocket - New error code
WSErrorCode::operation_cancelled = 11 - ASIO cancellation example in examples/asio/ex_cancel_asio.cpp
- Refactored
OpenSslContext, changed SSL security defaults
- New method
std::expected<bool, WSError> can_read()inWebSocketClientAsync,ISocketAsync,BufferedSocketAsync, andAsioSocket
- Removed all
usings ofstdtypes withinws_clientnamespace, now fully qualified use everywhere - Improved error handling and messages for SSL and sys calls
- SSL error queue always cleared before SSL calls
- Error in macro
WS_ERRORif used outside ofws_clientnamespace due to unqualified use ofWSErrorandWSErrorCodeif nousing namespace ws_clientat call site was present - Fix examples/tests where ASIO SSL hostname verification fails by adding call to
SSL_set_tlsext_host_name
- This changelog file
- New
Makefilewith commandsautobahn-docker,dev-install,test-close
- During tear-down of websocket client, skip SSL and TCP shutdown (directly close) if websocket client is in faulty state. This is to prevent the client from hanging/reaching timeout, and is closer to the behaviour the RFC spec mandates.
- Added parameter
bool fail_connectionto socket APIcloseandshutdownmethods. The parameter should be set totrueif the client and/or connection is in a faulty state. On shutdown/close, the client will skip SSL and TCP shutdown and directly close the connection since it's likely that the peer will not respond. - Removed
dev_install.shscript (moved toMakefile) - Better error message printing in examples
- Log alert
close_notifyinOpenSslSocketas warning instead of error
to_stringforws_client::close_codealso mapsnot_set