summaryrefslogtreecommitdiff
path: root/src/net/ea/network.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-09-30 19:54:06 -0600
committerJared Adams <jaxad0127@gmail.com>2009-09-30 19:54:06 -0600
commitd4f32a38fd498c180d562ced38a9129e0abf2252 (patch)
treee655b59ff686ad5fe2bdd11d6e072f5c3a4493b7 /src/net/ea/network.h
parent6707d108790ab1fe1d4a3ef52d717966990fdf0a (diff)
downloadmana-client-d4f32a38fd498c180d562ced38a9129e0abf2252.tar.gz
mana-client-d4f32a38fd498c180d562ced38a9129e0abf2252.tar.bz2
mana-client-d4f32a38fd498c180d562ced38a9129e0abf2252.tar.xz
mana-client-d4f32a38fd498c180d562ced38a9129e0abf2252.zip
Merge login state machines for both clients
Also do some cleanup and refactoring of related code.
Diffstat (limited to 'src/net/ea/network.h')
-rw-r--r--src/net/ea/network.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/net/ea/network.h b/src/net/ea/network.h
index 741a8297..b61f363b 100644
--- a/src/net/ea/network.h
+++ b/src/net/ea/network.h
@@ -22,6 +22,8 @@
#ifndef EA_NETWORK_H
#define EA_NETWORK_H
+#include "net/serverinfo.h"
+
#include <SDL_net.h>
#include <SDL_thread.h>
@@ -47,10 +49,13 @@ class Network
~Network();
- bool connect(const std::string &address, short port);
+ bool connect(ServerInfo server);
void disconnect();
+ ServerInfo getServer()
+ { return mServer; }
+
void registerHandler(MessageHandler *handler);
void unregisterHandler(MessageHandler *handler);
@@ -97,8 +102,7 @@ class Network
TCPsocket mSocket;
- std::string mAddress;
- short mPort;
+ ServerInfo mServer;
char *mInBuffer, *mOutBuffer;
unsigned int mInSize, mOutSize;