summaryrefslogtreecommitdiff
path: root/src/net/network.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/network.h')
-rw-r--r--src/net/network.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/net/network.h b/src/net/network.h
index 47e71190..1038b954 100644
--- a/src/net/network.h
+++ b/src/net/network.h
@@ -24,16 +24,24 @@
#ifndef _TMW_NETWORK_
#define _TMW_NETWORK_
+#define NET_ERROR -1
+#define NET_CONNECTED 0
+#define NET_IDLE 1
+#define NET_CONNECTING 2
+
class MessageIn;
/** Convert an address from int format to string */
char *iptostring(int address);
/** Open a session with a server */
-int open_session(const char* address, short port);
+void openConnection(const char* address, short port);
+
+/** Returns the status of the current connection attempt. */
+int pollConnection();
/** Close a session */
-void close_session();
+void closeConnection();
/** Send and receive data waiting in the buffers */
void flush();