
File Import issues on multiplayer server
spike11302000 opened this issue ยท 2 comments
This is occurring because the maximum size of a varint, which is used to encode the length of basically all messages being sent to and from the server, cannot be larger than 32767 bytes, the largest value of a five byte varint.
So basically, the problem is is that whatever code is handling file sending sends everything in one giant message, regardless of how big the file is or if it can actually send it. What needs to happen is whatever is sending files to the client needs to be able to slice up the file and send it in segments smaller than or exactly 32767 bytes. No message larger than this is able to be handled properly without significant changes to Minecraft's networking protocol, which frankly isn't worth it.
Thank you very much for sharing this report.
i dont know much about minecraft's networking but with the bit of research i have done it seems difficult to bypass the 32K client-> server packet limit. i do think the best way is to send it in chunks smaller then 32kb but im just not knowledgeable enough with forge/java to implement this myself