From 4e06c837ff9b1ff4add1b860fa33d9112e3be37d Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Fri, 10 May 2013 17:07:52 -0500 Subject: [PATCH] adds post/pre init and connect timeout values to default configs --- websocketpp/config/core.hpp | 20 ++++++++++++++++++-- websocketpp/config/core_client.hpp | 20 ++++++++++++++++++-- websocketpp/config/debug.hpp | 20 ++++++++++++++++++-- 3 files changed, 54 insertions(+), 6 deletions(-) diff --git a/websocketpp/config/core.hpp b/websocketpp/config/core.hpp index 463cacc067..967f60451d 100644 --- a/websocketpp/config/core.hpp +++ b/websocketpp/config/core.hpp @@ -99,12 +99,28 @@ struct core { /// Default timer values (in ms) + /// Length of time to wait for socket pre-initialization + /** + * Exactly what this includes depends on the socket policy in use + */ + static const long timeout_socket_preinit = 5000; + /// Length of time to wait before a proxy handshake is aborted static const long timeout_proxy = 5000; - /// Length of time to wait before a tls handshake is aborted - static const long timeout_tls_handshake = 5000; + + /// Length of time to wait for socket post-initialization + /** + * Exactly what this includes depends on the socket policy in use. + * Often this means the TLS handshake + */ + static const long timeout_socket_postinit = 5000; + /// Length of time to wait for dns resolution static const long timeout_dns_resolve = 5000; + + /// Length of time to wait for TCP connect + static const long timeout_connect = 5000; + /// Length of time to wait for socket shutdown static const long timeout_socket_shutdown = 5000; }; diff --git a/websocketpp/config/core_client.hpp b/websocketpp/config/core_client.hpp index ce7820192d..4880f8ae63 100644 --- a/websocketpp/config/core_client.hpp +++ b/websocketpp/config/core_client.hpp @@ -100,12 +100,28 @@ struct core_client { /// Default timer values (in ms) + /// Length of time to wait for socket pre-initialization + /** + * Exactly what this includes depends on the socket policy in use + */ + static const long timeout_socket_preinit = 5000; + /// Length of time to wait before a proxy handshake is aborted static const long timeout_proxy = 5000; - /// Length of time to wait before a tls handshake is aborted - static const long timeout_tls_handshake = 5000; + + /// Length of time to wait for socket post-initialization + /** + * Exactly what this includes depends on the socket policy in use. + * Often this means the TLS handshake + */ + static const long timeout_socket_postinit = 5000; + /// Length of time to wait for dns resolution static const long timeout_dns_resolve = 5000; + + /// Length of time to wait for TCP connect + static const long timeout_connect = 5000; + /// Length of time to wait for socket shutdown static const long timeout_socket_shutdown = 5000; }; diff --git a/websocketpp/config/debug.hpp b/websocketpp/config/debug.hpp index eb3a11e7dc..8690e62f0d 100644 --- a/websocketpp/config/debug.hpp +++ b/websocketpp/config/debug.hpp @@ -99,13 +99,29 @@ struct debug_core { typedef type::response_type response_type; /// Default timer values (in ms) + + /// Length of time to wait for socket pre-initialization + /** + * Exactly what this includes depends on the socket policy in use + */ + static const long timeout_socket_preinit = 5000; /// Length of time to wait before a proxy handshake is aborted static const long timeout_proxy = 5000; - /// Length of time to wait before a tls handshake is aborted - static const long timeout_tls_handshake = 5000; + + /// Length of time to wait for socket post-initialization + /** + * Exactly what this includes depends on the socket policy in use. + * Often this means the TLS handshake + */ + static const long timeout_socket_postinit = 5000; + /// Length of time to wait for dns resolution static const long timeout_dns_resolve = 5000; + + /// Length of time to wait for TCP connect + static const long timeout_connect = 5000; + /// Length of time to wait for socket shutdown static const long timeout_socket_shutdown = 5000; };