Google
Darkstar server address
Nothing on setting the IP address instead of using localhost.
Google
Darkstar server host address
Found
http://www.projectdarkstar.com/distributions/current/sgs-server/doc/com/sun/sgs/app/doc-files/config-properties.html
but nothing there. This is where I would think it would be..hmm...
At http://wiki.netbeans.org/DarkstarSupport, found reference to
DarkStarSocketClient
that takes host, port, and this as parameters. May be useful
to look up later...hmm..this is a client class..not server..
bah..try checking out server code from
https://sgs-server.dev.java.net/svn/sgs-server/trunk
should be able to find where the host address comes from..Search for
"localhost" in all files..only found in ShutdownHandler.java..
hmm..ServerSocket uses InetAddress.getByName(null) as address?..search
for InetAddress..search for SERVER_HOST..
Used in
DataStoreClient.java
NodeMappingServiceImpl.java
ConfigManager.java
StandardProperties.java
WatchdogServiceImpl.java
SgsTestNode.java
TestNodeMappingServiceImpl.java
From looking at StandardProperties.java, seems to be
com.sun.sgs.server.host=
is the setting property..test..add to MudMain.properties file
com.sun.sgs.server.host=192.168.0.9
to see if no connection is made. (My IP is really 192.168.0.2)
hmm..no effect..Client still logs on..
Looking in ConfigManager.java (this seems to read in the properties
file)
getServerHostName() returns serverHost which is equated to SERVER_HOST
property..who calls this?..search server code..
ConfigMXBean.java is the Interface that has it.
TestMBeans.java is a test system.
hmm..maybe hostName (ConfigManager.java) is what defines the host..serverHost
is refered to as a properties value, where hostName is said to be where
the app is running..
An Idea...I think a server listening on a port looks for that port
on ALL of its addresses...
So change Client to try to log on 192.168.0.2...
Change MudClient.java
// private static final String SERVERNAME = "localhost";
private static final String SERVERNAME = "192.168.0.2";
compile and run from NetBeans..well, it logged on..try changing to
..0.3..HA..no login..woo hoo!!
Time for the big test..going to put server dist on an online machine
and try to connect.
IP=216.86.198.187 for direct internet. (Linux Fedora 9)
IP=192.168.0.3 for local net machine. (Linux Fedora 10)
IP=192.168.0.2 for local machine. (Vista)
Copy darkmudReduxNB.jar over to ../tutorial on local net machine.
Copy ../tutorial/conf files
darkmudReduxNB.boot, logging.properties, MudMain.properties
over to ../tutorial/conf on local net machine....change MudClient to
use 192.168.0.3
Start up server on local net machine and try to login..boo..hmm..unblock
port??
Tried disableing Firewall and SELinux..no good...try putting on internet
direct system.
Yep. This was earier than I thought, if I had though at all.
Just d/l the 0.9.9 server distibution and unzip into a regular user
folder.
Copy the jar file into the tutorial folder and the three conf files
into the conf folder and launch as usual.
Changed the Client to use 216.86.198.187 as a host. Build and run.
Logs in and plays..doh.
I think my router was blocking the port when trying to use the local
net..but no biggy. Te internet server was what I wanted up anyways.
All done here.