Get our listen port from a server property if specified.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2370 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-04-01 04:00:54 +00:00
parent cb6d73e98c
commit a59aa8f94d
@@ -1,10 +1,11 @@
//
// $Id: MiCasaServer.java,v 1.7 2002/10/21 20:56:20 mdb Exp $
// $Id: MiCasaServer.java,v 1.8 2003/04/01 04:00:54 mdb Exp $
package com.threerings.micasa.server;
import com.threerings.crowd.server.CrowdServer;
import com.threerings.parlor.server.ParlorManager;
import com.threerings.presents.client.Client;
import com.threerings.micasa.Log;
import com.threerings.micasa.lobby.LobbyRegistry;
@@ -42,6 +43,20 @@ public class MiCasaServer extends CrowdServer
Log.info("MiCasa server initialized.");
}
/**
* Returns the port on which the connection manager will listen for
* client connections.
*/
protected int getListenPort ()
{
int port = Client.DEFAULT_SERVER_PORT;
try {
port = Integer.parseInt(System.getProperty("port"));
} catch (Exception e) {
}
return port;
}
public static void main (String[] args)
{
MiCasaServer server = new MiCasaServer();