From 8b30e312bbc0728b527941d5b0a6d0f621025ed0 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 8 Jun 2014 15:13:08 +0200 Subject: Add a TimedEvent to cancel the connection to a server after 5 seconds --- src/network/socket_handler.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/network/socket_handler.hpp') diff --git a/src/network/socket_handler.hpp b/src/network/socket_handler.hpp index 02311c4..95e38bd 100644 --- a/src/network/socket_handler.hpp +++ b/src/network/socket_handler.hpp @@ -85,6 +85,11 @@ public: * Close the connection, remove us from the poller */ void close(); + /** + * Called by a TimedEvent, when the connection did not succeed or fail + * after a given time. + */ + void on_connection_timeout(); /** * Called when the connection is successful. */ -- cgit v1.2.3