summaryrefslogtreecommitdiff
path: root/src/network/core
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-10-15 18:42:52 +0000
committerrubidium <rubidium@openttd.org>2010-10-15 18:42:52 +0000
commit7ba07d9573b7224846c183db25af43253bf5f7b9 (patch)
tree75acd4a6ab38474b6e5c758ef43de27d1f3a6117 /src/network/core
parent8f9ae44a6713efa41de390846b6804a0d3d3bc92 (diff)
downloadopenttd-7ba07d9573b7224846c183db25af43253bf5f7b9.tar.xz
(svn r20929) -Codechange: make NetworkCloseClient a class method
Diffstat (limited to 'src/network/core')
-rw-r--r--src/network/core/tcp_game.cpp3
-rw-r--r--src/network/core/tcp_game.h1
2 files changed, 2 insertions, 2 deletions
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; }