best way to resolve running game servers on lan

8cc5b33ebf1873c2d4525722db1b5e1a
0
serious_spaam 101 Aug 28, 2003 at 12:05

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 !!

3 Replies

Please log in or register to post a reply.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Aug 29, 2003 at 07:37

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..

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Aug 29, 2003 at 17:39

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.

8cc5b33ebf1873c2d4525722db1b5e1a
0
serious_spaam 101 Sep 02, 2003 at 12:02

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