-
Notifications
You must be signed in to change notification settings - Fork 81
Description
Heya,
This isn't really an issue right now because h1-mod only has a handful of servers, however getServersResponse can not handle responses which are fragmented over several UDP packets. getServersResponse is fragmented into several chunks if it exceeds a predefined limit (usually the layer 2 MTU of around 1500),
h1-mod/src/client/component/server_list.cpp
Line 516 in 132e550
| network::on("getServersResponse", [](const game::netadr_s& target, const std::string& data) |
The code currently only handles one UDP frame.
An example of something the code can't handle
Packet 1
getServersResponse\IP,PORT\
\IP,PORT\
\IP,PORT\
\IP,PORT\
.....
Packet 2
IP,PORT\
\IP,PORT\
\IP,PORT\
\IP,PORT\
Packet 3
IP,PORT\
\IP,PORT\
\IP,PORT\
\IP,PORT\
\EOT
The correct implementation would be to keep consuming the UDP frames until you reach an \EOT packet. This would obviously need some sort of state machine for the networking layer. I don't think anything like this exists in the current codebase.
This is more of a backburner issue, but one nonetheless
Thanks,
I'll have a crack at implementing this when i can :)