![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
Options for a WebSocket session (WsSession, WssSession). More...
#include <algotradelib/src/network/ws_session_base.hpp>
Public Attributes | |
| std::string | target_ {"/"} |
| The path of the upgrade request. | |
| std::map< std::string, std::string > | headers_ |
| Extra headers sent with the upgrade request. | |
| std::chrono::seconds | operation_timeout_ {30} |
| The deadline for the TCP connect and (for WssSession) the TLS handshake. The DNS lookup has no deadline, and the WebSocket upgrade uses Beast's suggested client timeouts. Those set no idle timeout, so the session sends no keep-alive ping: a connection that goes silent without closing is noticed only when TCP reports it. | |
| bool | automatic_reconnect_ {false} |
| Whether to reconnect after a failure or a close not requested with close(). | |
| std::chrono::seconds | reconnect_initial_ {1} |
| The first reconnect delay; it doubles on each attempt, plus up to 20% random jitter. | |
| std::chrono::seconds | reconnect_max_ {30} |
| The longest reconnect delay (before jitter). | |
Options for a WebSocket session (WsSession, WssSession).
Definition at line 40 of file ws_session_base.hpp.
| bool algotradelib::network::WebSocketSessionOptions::automatic_reconnect_ {false} |
Whether to reconnect after a failure or a close not requested with close().
Definition at line 53 of file ws_session_base.hpp.
| std::map<std::string, std::string> algotradelib::network::WebSocketSessionOptions::headers_ |
Extra headers sent with the upgrade request.
Definition at line 44 of file ws_session_base.hpp.
Referenced by algotradelib::network::WebSocketSessionBase< Derived, Stream >::start_ws_handshake().
| std::chrono::seconds algotradelib::network::WebSocketSessionOptions::operation_timeout_ {30} |
The deadline for the TCP connect and (for WssSession) the TLS handshake. The DNS lookup has no deadline, and the WebSocket upgrade uses Beast's suggested client timeouts. Those set no idle timeout, so the session sends no keep-alive ping: a connection that goes silent without closing is noticed only when TCP reports it.
Definition at line 51 of file ws_session_base.hpp.
| std::chrono::seconds algotradelib::network::WebSocketSessionOptions::reconnect_initial_ {1} |
The first reconnect delay; it doubles on each attempt, plus up to 20% random jitter.
Definition at line 55 of file ws_session_base.hpp.
| std::chrono::seconds algotradelib::network::WebSocketSessionOptions::reconnect_max_ {30} |
The longest reconnect delay (before jitter).
Definition at line 57 of file ws_session_base.hpp.
| std::string algotradelib::network::WebSocketSessionOptions::target_ {"/"} |
The path of the upgrade request.
Definition at line 42 of file ws_session_base.hpp.
Referenced by algotradelib::network::WebSocketSessionBase< Derived, Stream >::start_ws_handshake().