Added connect timeout.

This commit is contained in:
lotodore
2007-05-20 11:11:07 +00:00
parent 4a53678291
commit 5438aa487c
4 changed files with 39 additions and 8 deletions
+10
View File
@@ -21,8 +21,10 @@
#ifndef _CLIENTSTATE_H_
#define _CLIENTSTATE_H_
#include <net/socket_helper.h> // needed for correct order of header files.
#include <string>
#include <memory>
#include <core/boost/timer.hpp>
#define CLIENT_INITIAL_STATE ClientStateInit
@@ -110,6 +112,8 @@ public:
virtual ~ClientStateStartConnect();
void SetTimer(boost::microsec_timer timer);
// Call connect.
virtual int Process(ClientThread &client);
@@ -128,6 +132,8 @@ public:
virtual ~ClientStateConnecting();
void SetTimer(const boost::microsec_timer &timer);
// "Poll" for the completion of the TCP/IP connect call.
virtual int Process(ClientThread &client);
@@ -135,6 +141,10 @@ protected:
// Protected constructor - this is a singleton.
ClientStateConnecting();
private:
boost::microsec_timer m_connectTimer;
};
// State: Session init.