Why are server names truncated to 24 chars?
by Chris \"Hobbiticus\" Weiland · in Torque Game Engine · 01/21/2004 (10:30 am) · 4 replies
Just wanted to ask on the forums in case someone much more familiar with the net code knew a good reason for server names being truncated to 24 chars, instead of say...32 or 30 or even 27. Is it so that the ping packet will fit in 1 data packet? Was it just a nice number someone made up?
I'd like to call the official legends server the "Legends Development Server" but that's 26 chars. :( So, I just want to know if there is a good reason why I shouldn't change it to something like 32 chars instead of 24.
I'd like to call the official legends server the "Legends Development Server" but that's 26 chars. :( So, I just want to know if there is a good reason why I shouldn't change it to something like 32 chars instead of 24.
#2
01/21/2004 (11:17 am)
Torque doesn't use DNS names for hosts, it uses IP addresses. Chris, to get the ping all into one packet might just be it, then again what is truely the recommended max amount of bytes you should fit into a UDP packet? Does anybody know? ;)
#3
Why? No reason. Line 1647 in engine/game/net/serverQuery.cc holds the key. The matching read code doesn't validate length. The buffer it has is 256 bytes in length.
01/22/2004 (9:37 am)
Around 1500 is the max.Why? No reason. Line 1647 in engine/game/net/serverQuery.cc holds the key. The matching read code doesn't validate length. The buffer it has is 256 bytes in length.
#4
01/22/2004 (12:26 pm)
Ok, so I guess I'm not hurting anything by making the max server name length 32 instead of 24 then. 24 can be a little stringent.
Torque Owner Bill "[K]Noodles" Anderson