Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/netconnection.h')
-rw-r--r--src/core/netconnection.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/netconnection.h b/src/core/netconnection.h
index dca85c7..08536de 100644
--- a/src/core/netconnection.h
+++ b/src/core/netconnection.h
@@ -67,6 +67,12 @@ public:
inline bool connected() const { return ((connection_fd != -1) && !connection_error); }
+ enum State {Connecting=0, Connected=1};
+
+ inline State state() const { return connection_state; }
+
+ State connection_state;
+
protected:
/// receive incoming data and store messages
void receive();
@@ -86,14 +92,14 @@ private:
std::string sendq;
fd_set clientset;
+ float connection_timeout;
+ float connection_keepalive;
int connection_fd;
bool connection_error;
std::string connection_host;
int connection_port;
struct sockaddr_in server_addr;
char recvbuf[BLOCKSIZE];
-
- float timeout;
};
}