summaryrefslogtreecommitdiff
path: root/src/network/core/core.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-01-28 20:47:25 +0000
committerrubidium <rubidium@openttd.org>2007-01-28 20:47:25 +0000
commitf72dde5236afd8d9a2e29ae1750e8933666b711f (patch)
treef0a56923473a03a88c71f37b852a587ba3c56fa7 /src/network/core/core.h
parent2e984e04775e97ce07698c5f45ed868cb1727ead (diff)
downloadopenttd-f72dde5236afd8d9a2e29ae1750e8933666b711f.tar.xz
(svn r8445) -Cleanup: remove some @params from comments as the parameters did not exist anymore and add comments to several variables/functions.
Diffstat (limited to 'src/network/core/core.h')
-rw-r--r--src/network/core/core.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/core/core.h b/src/network/core/core.h
index f88fd0116..a4cef3b5e 100644
--- a/src/network/core/core.h
+++ b/src/network/core/core.h
@@ -7,9 +7,14 @@
#include "os_abstraction.h"
+/**
+ * @file core.h Base for all network types (UDP and TCP)
+ */
+
bool NetworkCoreInitialize(void);
void NetworkCoreShutdown(void);
+/** Status of a network client; reasons why a client has quit */
typedef enum {
NETWORK_RECV_STATUS_OKAY, ///< Everything is okay
NETWORK_RECV_STATUS_DESYNC, ///< A desync did occur
@@ -32,7 +37,10 @@ public:
bool has_quit; ///< Whether the current client has quit/send a bad packet
SOCKET sock; ///< The socket currently connected to
public:
+ /** Create a new unbound socket */
NetworkSocketHandler() { this->sock = INVALID_SOCKET; this->has_quit = false; }
+
+ /** Close the socket when distructing the socket handler */
virtual ~NetworkSocketHandler() { this->Close(); }
/** Really close the socket */