FANDOM


Forums: Index > Development > Multicast message to freeciv serverS runing on the same machine


I see a problem in that LAN_SERVER_PORT is a unique value. So, suppose i have a powerful computer and I want to run several instances of civserver it seems to me it will be impossible to query these servers. Or I am wrong? —Preceding unsigned comment added by 77.85.2.5 (talkcontribs) 19:56, January 30, 2010

You have to start the server with the argument --port port-number to have many servers running at the same time. Pepeto 22:40, January 31, 2010 (UTC)
The first poster seems to refer to the 'Local Area Network' list in civclient, which somehow finds local network servers. I now started civserver and civserver -p 5557 and civserver -p 5558, so I have three servers from same machine. However, only one server appears in my 'Local Area Network' list. The first poster is correct: it is impossible to query the other two servers!
I peek at begin_lanserver_scan in client/servers.c, and server_open_socket in server/sernet.c. This seems to use multicast UDP packets to find servers among local network. I am not sure, but some years ago, I might have learned about some socket option to allow multiple processes to listen to same port. If we use that option, might civclient find multiple servers from same machine? --Kernigh 18:52, February 5, 2010 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.