PDA

View Full Version : best way to resolve running game servers on lan


serious spaam
08-28-2003, 05:05 AM
i was wondering how a game client automatically finds currently running game servers in a lan. after a bit of thought i came up with a server side and a client side approach( i havent tested them yet ).

1) the client side approach is probably a bit dull, but could work for (single network) lan: the idea is that the client resolves its ip adress and scans the whole subnet for running servers. while this would be fast and simple for C,D class networks it will be probably quite expensive and time consuming in an A class lan.
another down side is as indicated above that lans split up in multiple networks are not covered by this approach.

2) the server side solution that popped into my mind would require the game server to
send a broadcast signal as kind of a beacon( a ping for instance ) for the game clients. again this approach may perform weak in a big lan with plenty of running servers.

are any of the two approaches worth a try or total crap ? what would you suggest ? has anyone in here mastered such a problem before ?

greetings, serious !!

davepermen
08-29-2003, 12:37 AM
a friend of me solved that problem i think. i don't know how, as i haven't seen him for a while. i'll try to get that info asap..

baldurk
08-29-2003, 10:39 AM
I think there is a way to query the OS for current computers. I believe that the OS keeps a record of all computers on the lan, so you get their IPs and send a message to them all. However I could be wrong as networking was never my strong point.

serious spaam
09-02-2003, 05:02 AM
thanks, i will take a look on some os-apis (linux/win32) for it. strangely i have not thought about this way at all (i think windows does some netbios magic - which is probably similar my broadcasting idea).

greetings,
serious