diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-10-16 13:42:33 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-10-16 13:42:33 +0000 |
commit | 59167f0f02dfd2c8463b2f3d93a8ac219dcc012e (patch) | |
tree | 3dd32d4594c1a194c4cc19e1614ea01290417431 /src/net/network.h | |
parent | d205342bb908207f7921c444e539072e006be241 (diff) | |
download | mana-59167f0f02dfd2c8463b2f3d93a8ac219dcc012e.tar.gz mana-59167f0f02dfd2c8463b2f3d93a8ac219dcc012e.tar.bz2 mana-59167f0f02dfd2c8463b2f3d93a8ac219dcc012e.tar.xz mana-59167f0f02dfd2c8463b2f3d93a8ac219dcc012e.zip |
The connection should be non-blocking now and fixed the problem with sound not being played at startup.
Diffstat (limited to 'src/net/network.h')
-rw-r--r-- | src/net/network.h | 12 |
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(); |