Separated TCP and UDP bind hostnames (we want to be able to bind to the

wildcard address for TCP in order to accept connections on both the
public hostname and the internal hostname used for peers, but bind to the
public hostname for UDP because binding to the wildcard address seems to
cause problems receiving packets).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6066 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2010-05-07 01:12:55 +00:00
parent 45694bc0f0
commit 9043e99f7a
2 changed files with 28 additions and 13 deletions
@@ -157,7 +157,8 @@ public class PresentsServer
_clmgr.setInjector(injector);
// configure our connection manager
_conmgr.init(getBindHostname(), getListenPorts(), getDatagramPorts());
_conmgr.init(getBindHostname(), getDatagramHostname(),
getListenPorts(), getDatagramPorts());
// initialize the time base services
TimeBaseProvider.init(_invmgr, _omgr);
@@ -224,14 +225,23 @@ public class PresentsServer
}
/**
* Returns the hostname on which the connection manager will listen for TCP and datagram
* traffic, or <code>null</code> to bind to the wildcard address.
* Returns the hostname on which the connection manager will listen for TCP traffic, or
* <code>null</code> to bind to the wildcard address.
*/
protected String getBindHostname ()
{
return null;
}
/**
* Returns the hostname on which the connection will listen for datagram traffic, or
* <code>null</code> to bind to the wildcard address.
*/
protected String getDatagramHostname ()
{
return null;
}
/**
* Returns the port on which the connection manager will listen for client connections.
*/