From 4d5dbf51707c42c24eeafdb65016b079c54adcf2 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 2 May 2011 16:14:23 +0000 Subject: (svn r22410) -Document: some more bits ;) --- src/network/network_command.cpp | 1 + src/network/network_gamelist.cpp | 3 ++- src/network/network_type.h | 7 +++++-- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/network') diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp index d68021205..27e8338fb 100644 --- a/src/network/network_command.cpp +++ b/src/network/network_command.cpp @@ -275,6 +275,7 @@ static void DistributeQueue(CommandQueue *queue, const NetworkClientSocket *owne } } +/** Distribute the commands of ourself and the clients. */ void NetworkDistributeCommands() { /* First send the server's commands. */ diff --git a/src/network/network_gamelist.cpp b/src/network/network_gamelist.cpp index 707c5c36b..4511397da 100644 --- a/src/network/network_gamelist.cpp +++ b/src/network/network_gamelist.cpp @@ -25,7 +25,9 @@ NetworkGameList *_network_game_list = NULL; +/** Mutex for handling delayed insertion/querying of servers. */ static ThreadMutex *_network_game_list_mutex = ThreadMutex::New(); +/** The games to insert when the GUI thread has time for us. */ static NetworkGameList *_network_game_delayed_insertion_list = NULL; /** @@ -72,7 +74,6 @@ static void NetworkGameListHandleDelayedInsert() * Add a new item to the linked gamelist. If the IP and Port match * return the existing item instead of adding it again * @param address the address of the to-be added item - * @param port the port the server is running on * @return a point to the newly added or already existing item */ NetworkGameList *NetworkGameListAddItem(NetworkAddress address) diff --git a/src/network/network_type.h b/src/network/network_type.h index f40a1cdd5..ff29492b7 100644 --- a/src/network/network_type.h +++ b/src/network/network_type.h @@ -72,11 +72,13 @@ struct NetworkCompanyState { struct NetworkClientInfo; +/** The type of password we're asking for. */ enum NetworkPasswordType { - NETWORK_GAME_PASSWORD, - NETWORK_COMPANY_PASSWORD, + NETWORK_GAME_PASSWORD, ///< The password of the game. + NETWORK_COMPANY_PASSWORD, ///< The password of the company. }; +/** Destination of our chat messages. */ enum DestType { DESTTYPE_BROADCAST, ///< Send message/notice to all clients (All) DESTTYPE_TEAM, ///< Send message/notice to everyone playing the same company (Team) @@ -98,6 +100,7 @@ enum NetworkAction { NETWORK_ACTION_COMPANY_NEW, }; +/** The error codes we send around in the protocols. */ enum NetworkErrorCode { NETWORK_ERROR_GENERAL, // Try to use this one like never -- cgit v1.2.3-70-g09d2