[Pogamut-list] Set Port, Multiple Servers

jacob.schrum pogamut-forum at diana.ms.mff.cuni.cz
Sat Jul 7 22:48:09 CEST 2012


Set Port, Multiple Servers

Author: jacob.schrum

If I want to run multiple servers at once in parallel, then each server needs to have different ports. The important ports can be set with a string 

"?BotServerPort=" + botPort + "?ControlServerPort=" + controlPort + "?ObservingServerPort=" + observePort"

in the setOptions method of UCCWrapperConf. Technically speaking, this is all that is needed to run multiple servers simultaneously. However, I would also like to be able to spectate in each individual server, which requires each server to use another port. However, this port can't be set from the option straing (as far as I know).

In the previous version of Pogamut I actually modified UCCWrapper to take the extra port as input (and an INI file as well), which was used in the initUCCWrapper method to modify the UCC ProcessBuilder like this:

ProcessBuilder procBuilder = new ProcessBuilder(execStr, "server", parameter, "-server", "-ini=" + this.iniFile, "-port=" + this.port);
            
This corresponds to a ucc command that looks something like:
"ucc server MapName?Game=GameTypeClass?Parameter1=Value1?Parameter2=Value1,Value2?Parameter3=Value1 -server -ini=INIFile.ini -port=7555"

Now, my question is: does there currently exist a way to define which port game clients can connect to the server at (and remember that I need to run multiple servers), or do I need to introduce changes like this again? Making changes to the Pogamut libraries seems to be harder with the Maven integration, so I would really rather not mess with it. I'm hoping a solution already exists.

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_parentId=999#form>




More information about the Pogamut-list mailing list