diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-09-30 19:54:06 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-09-30 19:54:06 -0600 |
commit | d4f32a38fd498c180d562ced38a9129e0abf2252 (patch) | |
tree | e655b59ff686ad5fe2bdd11d6e072f5c3a4493b7 /src/net/tmwserv/connection.cpp | |
parent | 6707d108790ab1fe1d4a3ef52d717966990fdf0a (diff) | |
download | mana-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/tmwserv/connection.cpp')
-rw-r--r-- | src/net/tmwserv/connection.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/tmwserv/connection.cpp b/src/net/tmwserv/connection.cpp index 6762af89..9346e3cc 100644 --- a/src/net/tmwserv/connection.cpp +++ b/src/net/tmwserv/connection.cpp @@ -32,6 +32,7 @@ Net::Connection::Connection(ENetHost *client): mConnection(0), mClient(client) { + mPort = 0; Net::connections++; } @@ -66,6 +67,8 @@ bool Net::Connection::connect(const std::string &address, short port) return false; } + mPort = port; + return true; } @@ -95,8 +98,6 @@ void Net::Connection::send(const MessageOut &msg) return; } - //logger->log("Sending message of size %d...", msg.getDataSize()); - ENetPacket *packet = enet_packet_create(msg.getData(), msg.getDataSize(), ENET_PACKET_FLAG_RELIABLE); |