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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user