FANDOM


(If we use socket option?)
 
Line 3: Line 3:
 
<!-- Please put your content under this line. Be sure to sign your edits with four tildes ~~~~ -->
 
<!-- Please put your content under this line. Be sure to sign your edits with four tildes ~~~~ -->
   
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?
+
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? <small><span class="autosigned">—Preceding [[Help:Signature|unsigned]] comment added by [[User:77.85.2.5|77.85.2.5]] ([[User talk:77.85.2.5|talk]] • [[Special:Contributions/77.85.2.5|contribs]]) 19:56, January 30, 2010</span></small>
   
 
:You have to start the server with the argument '''--port''' ''port-number'' to have many servers running at the same time. [[User:Pepeto|Pepeto]] 22:40, January 31, 2010 (UTC)
 
:You have to start the server with the argument '''--port''' ''port-number'' to have many servers running at the same time. [[User:Pepeto|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? --[[User:Kernigh|Kernigh]] 18:52, February 5, 2010 (UTC)

Latest revision as of 18:52, February 5, 2010

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.