From 5f0ebee0d4d75fa91d417f4f352abdbc7502c2f0 Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Thu, 2 Nov 2006 12:43:49 +0000 Subject: Network layer refactoring. --- src/net/charserverhandler.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/net/charserverhandler.cpp') diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp index 4e251524..f715b434 100644 --- a/src/net/charserverhandler.cpp +++ b/src/net/charserverhandler.cpp @@ -23,9 +23,9 @@ #include "charserverhandler.h" -#include "messagein.h" -#include "network.h" +#include "connection.h" #include "protocol.h" +#include "messagein.h" #include "../game.h" #include "../localplayer.h" @@ -35,6 +35,9 @@ #include "../gui/ok_dialog.h" +extern Net::Connection *gameServerConnection; +extern Net::Connection *chatServerConnection; + CharServerHandler::CharServerHandler() { static const Uint16 _messages[] = { @@ -174,8 +177,8 @@ CharServerHandler::handleCharSelectResponse(MessageIn &msg) logger->log("Game server: %s:%d", gameServer.c_str(), gameServerPort); logger->log("Chat server: %s:%d", chatServer.c_str(), chatServerPort); - Network::connect(Network::GAME, gameServer, gameServerPort); - Network::connect(Network::CHAT, chatServer, chatServerPort); + gameServerConnection->connect(gameServer, gameServerPort); + chatServerConnection->connect(chatServer, chatServerPort); // Keep the selected character and delete the others player_node = mCharInfo->getEntry(); -- cgit v1.2.3-70-g09d2