Download thread
Revision as of 17:51, 14 August 2012 by Freeman (talk | contribs) (Created page with "As mentioned here, if Allow_Download=1, then clients will be able to download maps and their sceneries/textures before joining the game. The request u...")
As mentioned here, if Allow_Download=1, then clients will be able to download maps and their sceneries/textures before joining the game. The request used is as follows:
<filename> [!] Request file STARTFILES <size> [!] 4 byte Integer <filename> [!] If nothing is found here, then file doesn't exist <filename-contents-binary> ENDFILES
NOTE: the file transfer protocol is changing in 1.5.0 to allow the request of multiple files simultaneously.
Contents
Example request
maps/Arena.PMS [!] <- STARTFILES [!] -> <size> [!] -> maps/Arena.PMS [!] -> file_contents [!] -> ENDFILES [!] ->
Using the map thread to retrieve gamestat.txt
logs/gamestat.txt\r\n STARTFILES\r\n <size> logs/gamestat.txt\r\n \0\0\SOH3In-Game Statistics\n Players: 7\n Map: ctf_Run\n Game...\n ...\n ENDFILES\r\n
1.5 Request
STARTFILES\r\n maps/<map>.PMS\r\n logs/gamestat.txt\r\n ... ENDFILES\r\n
1.5 Response
STARTFILES\r\n <overall data size (only real data)> maps/<map>.PMS\r\n<filesize><content> logs/gamestat.txt\r\n<filesize><content> ... ENDFILES\r\n