From 7ba07d9573b7224846c183db25af43253bf5f7b9 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 15 Oct 2010 18:42:52 +0000 Subject: (svn r20929) -Codechange: make NetworkCloseClient a class method --- src/network/core/tcp_game.cpp | 3 +-- src/network/core/tcp_game.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/network/core') diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp index b0db78eb7..037cb42fc 100644 --- a/src/network/core/tcp_game.cpp +++ b/src/network/core/tcp_game.cpp @@ -47,7 +47,6 @@ NetworkGameSocketHandler::NetworkGameSocketHandler(SOCKET s) * For clients: close connection and drop back to main-menu * For servers: close connection and that is it * @return the new status - * TODO: needs to be splitted when using client and server socket packets */ NetworkRecvStatus NetworkGameSocketHandler::CloseConnection(bool error) { @@ -61,7 +60,7 @@ NetworkRecvStatus NetworkGameSocketHandler::CloseConnection(bool error) return NETWORK_RECV_STATUS_CONN_LOST; } - return NetworkCloseClient(this, error ? NETWORK_RECV_STATUS_SERVER_ERROR : NETWORK_RECV_STATUS_CONN_LOST); + return this->CloseConnection(error ? NETWORK_RECV_STATUS_SERVER_ERROR : NETWORK_RECV_STATUS_CONN_LOST); } diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h index f083396e8..5ab814bae 100644 --- a/src/network/core/tcp_game.h +++ b/src/network/core/tcp_game.h @@ -179,6 +179,7 @@ public: CommandQueue outgoing_queue; ///< The command-queue awaiting delivery NetworkRecvStatus CloseConnection(bool error = true); + virtual NetworkRecvStatus CloseConnection(NetworkRecvStatus status) = 0; virtual ~NetworkGameSocketHandler() {} inline void SetInfo(NetworkClientInfo *info) { assert(info != NULL && this->info == NULL); this->info = info; } -- cgit v1.2.3-70-g09d2