Difference between revisions of "Download thread"
(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...") |
|||
Line 9: | Line 9: | ||
NOTE: the file transfer protocol is changing in 1.5.0 to allow the request of multiple files simultaneously. | NOTE: the file transfer protocol is changing in 1.5.0 to allow the request of multiple files simultaneously. | ||
+ | |||
==Example request== | ==Example request== | ||
Line 18: | Line 19: | ||
file_contents {{Comment|1=->}} | file_contents {{Comment|1=->}} | ||
ENDFILES {{Comment|1=->}} | ENDFILES {{Comment|1=->}} | ||
+ | |||
==Using the map thread to retrieve gamestat.txt== | ==Using the map thread to retrieve gamestat.txt== | ||
Line 39: | Line 41: | ||
... | ... | ||
ENDFILES\r\n | ENDFILES\r\n | ||
+ | |||
==1.5 Response== | ==1.5 Response== |
Latest revision as of 21:37, 16 April 2018
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