diff options
author | rubidium <rubidium@openttd.org> | 2011-05-05 16:24:48 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-05-05 16:24:48 +0000 |
commit | c4aa943aaa2718d046aa591555efb7538e77d780 (patch) | |
tree | 69f95b618a720fe5b8bed8d8514e0eccd79f78b4 /src/network/network_server.h | |
parent | 944a5cb7aafc4d8347c14154e24c05aa00b430c5 (diff) | |
download | openttd-c4aa943aaa2718d046aa591555efb7538e77d780.tar.xz |
(svn r22424) -Document: some more bits
Diffstat (limited to 'src/network/network_server.h')
-rw-r--r-- | src/network/network_server.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/network/network_server.h b/src/network/network_server.h index 2aa0bef34..ad1b381a9 100644 --- a/src/network/network_server.h +++ b/src/network/network_server.h @@ -19,7 +19,9 @@ #include "../thread/thread.h" class ServerNetworkGameSocketHandler; +/** Make the code look slightliy nicer/simpler. */ typedef ServerNetworkGameSocketHandler NetworkClientSocket; +/** Pool with all client sockets. */ typedef Pool<NetworkClientSocket, ClientIndex, 8, MAX_CLIENT_SLOTS, PT_NCLIENT> NetworkClientSocketPool; extern NetworkClientSocketPool _networkclientsocket_pool; @@ -125,7 +127,17 @@ public: void NetworkServer_Tick(bool send_frame); void NetworkServerSetCompanyPassword(CompanyID company_id, const char *password, bool already_hashed = true); +/** + * Iterate over all the sockets from a given starting point. + * @param var The variable to iterate with. + * @param start The start of the iteration. + */ #define FOR_ALL_CLIENT_SOCKETS_FROM(var, start) FOR_ALL_ITEMS_FROM(NetworkClientSocket, clientsocket_index, var, start) + +/** + * Iterate over all the sockets. + * @param var The variable to iterate with. + */ #define FOR_ALL_CLIENT_SOCKETS(var) FOR_ALL_CLIENT_SOCKETS_FROM(var, 0) #else /* ENABLE_NETWORK */ |