summaryrefslogtreecommitdiff
path: root/src/network/core
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-05 19:43:41 +0000
committerrubidium <rubidium@openttd.org>2009-04-05 19:43:41 +0000
commit0678cb561dd15a1e557f7c472eae30ed59c84095 (patch)
tree6968c32ee920928ca9dc33468f8e633950ed9eb5 /src/network/core
parentebb1ed660101445922e457893516de2394ce44b3 (diff)
downloadopenttd-0678cb561dd15a1e557f7c472eae30ed59c84095.tar.xz
(svn r15961) -Codechange: prepare the 'client' side for receiving 'session keys' from the masterserver so servers can register with multiple IPs as the same server.
Diffstat (limited to 'src/network/core')
-rw-r--r--src/network/core/udp.cpp2
-rw-r--r--src/network/core/udp.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp
index 473d438ea..b2bc7b220 100644
--- a/src/network/core/udp.cpp
+++ b/src/network/core/udp.cpp
@@ -280,6 +280,7 @@ void NetworkUDPSocketHandler::HandleUDPPacket(Packet *p, NetworkAddress *client_
UDP_COMMAND(PACKET_UDP_SERVER_UNREGISTER);
UDP_COMMAND(PACKET_UDP_CLIENT_GET_NEWGRFS);
UDP_COMMAND(PACKET_UDP_SERVER_NEWGRFS);
+ UDP_COMMAND(PACKET_UDP_MASTER_SESSION_KEY);
default:
if (this->HasClientQuit()) {
@@ -315,5 +316,6 @@ DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_MASTER_RESPONSE_LIST);
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_SERVER_UNREGISTER);
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_CLIENT_GET_NEWGRFS);
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_SERVER_NEWGRFS);
+DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_MASTER_SESSION_KEY);
#endif /* ENABLE_NETWORK */
diff --git a/src/network/core/udp.h b/src/network/core/udp.h
index 61f0f8f8e..20e228100 100644
--- a/src/network/core/udp.h
+++ b/src/network/core/udp.h
@@ -86,6 +86,7 @@ enum PacketUDPType {
PACKET_UDP_SERVER_UNREGISTER, ///< Request to be removed from the server-list
PACKET_UDP_CLIENT_GET_NEWGRFS, ///< Requests the name for a list of GRFs (GRF_ID and MD5)
PACKET_UDP_SERVER_NEWGRFS, ///< Sends the list of NewGRF's requested.
+ PACKET_UDP_MASTER_SESSION_KEY, ///< Sends a fresh session key to the client
PACKET_UDP_END ///< Must ALWAYS be on the end of this list!! (period)
};
@@ -110,6 +111,7 @@ protected:
DECLARE_UDP_RECEIVE_COMMAND(PACKET_UDP_SERVER_UNREGISTER);
DECLARE_UDP_RECEIVE_COMMAND(PACKET_UDP_CLIENT_GET_NEWGRFS);
DECLARE_UDP_RECEIVE_COMMAND(PACKET_UDP_SERVER_NEWGRFS);
+ DECLARE_UDP_RECEIVE_COMMAND(PACKET_UDP_MASTER_SESSION_KEY);
void HandleUDPPacket(Packet *p, NetworkAddress *client_addr);