diff options
author | rubidium <rubidium@openttd.org> | 2011-05-01 13:29:40 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-05-01 13:29:40 +0000 |
commit | 99ec3a044aab32e0fe4aea03a5539cf0e4f129e9 (patch) | |
tree | 8d9cdc4b81d2d7c4a9ca505656b837777e38092a /src/network/core/tcp_game.h | |
parent | 536c581923e456ed6a0d1a47747b7c9e111d8755 (diff) | |
download | openttd-99ec3a044aab32e0fe4aea03a5539cf0e4f129e9.tar.xz |
(svn r22403) -Document: some more network/core code
Diffstat (limited to 'src/network/core/tcp_game.h')
-rw-r--r-- | src/network/core/tcp_game.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h index afa2879cb..53d6df892 100644 --- a/src/network/core/tcp_game.h +++ b/src/network/core/tcp_game.h @@ -525,11 +525,32 @@ public: uint last_packet; ///< Time we received the last frame. NetworkRecvStatus CloseConnection(bool error = true); + + /** + * Close the network connection due to the given status. + * @param status The reason the connection got closed. + */ virtual NetworkRecvStatus CloseConnection(NetworkRecvStatus status) = 0; virtual ~NetworkGameSocketHandler() {} - inline void SetInfo(NetworkClientInfo *info) { assert(info != NULL && this->info == NULL); this->info = info; } - inline NetworkClientInfo *GetInfo() const { return this->info; } + /** + * Sets the client info for this socket handler. + * @param info The new client info. + */ + inline void SetInfo(NetworkClientInfo *info) + { + assert(info != NULL && this->info == NULL); + this->info = info; + } + + /** + * Gets the client info of this socket handler. + * @return The client info. + */ + inline NetworkClientInfo *GetInfo() const + { + return this->info; + } NetworkRecvStatus ReceivePackets(); |