Initial Handshake
This page describes how to establish the connection and load the map (prepare the client to receive the game context).
Establishing the Connection
- The client sends a CONNECT control message.
- The server replies with CONNECT_ACCEPT.
- The client sends NETMSG_INFO, containing its network version and the server password, if needed.
- The server validates the version and password, then sends NETMSG_MAP_CHANGE, containing the map name, CRC, and file size. If validation fails, the server sends CLOSE with the reason.
Loading the Map
The client first looks for a local copy matching the announced map name and CRC, a value calculated from the file's contents to check that it is the expected map. If no matching copy is available, it requests the file through NETMSG_REQUEST_MAP_DATA, and the server responds with NETMSG_MAP_DATA.
Once the map has been loaded, the client sends NETMSG_READY. The server replies with NETMSG_CON_READY, telling the client to send its start information.
WARNING
NETMSG_READY only confirms that the map has been loaded. The player is not ready to enter the game until the server has processed its start information and sent NETMSGTYPE_SV_READYTOENTER.
The next steps are described on the Sending Game Context page.