Allow the select wait for ConnectionManager to be injected eg

bind(Integer.class).annotatedWith(IncomingEventWait.class).toInstance(1);
will make the select wait 1 millisecond.

Don't wait for the select for datagrams or sockets in BindingConnectionManager as there's already a
wait on the ConnectionManager's select.



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6163 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Charlie Groves
2010-09-16 18:23:10 +00:00
parent fc13de8b9a
commit 68a5c21cda
8 changed files with 50 additions and 19 deletions
@@ -33,12 +33,13 @@ public class SocketChannelAcceptor extends SelectAcceptor
* @param failureHandler - called when the selector is irredemably broken.
* @param bindHostname - the hostname to bind to or null for all interfaces
* @param ports - the ports to bind to, or an empty array to skip binding
* @param selectLoopTime - the amount of time to wait in select, or 0 to skip the wait at all.
*/
public SocketChannelAcceptor (SocketChannelHandler connectionHandler,
SelectFailureHandler failureHandler, String bindHostname, int[] ports)
SelectFailureHandler failureHandler, String bindHostname, int[] ports, int selectLoopTime)
throws IOException
{
super(failureHandler, bindHostname, ports);
super(failureHandler, bindHostname, ports, selectLoopTime);
_connHandler = connectionHandler;
}