Hi,
I have the following code for a simple read only udp server. Am using v
2.0.0-M4
acceptor = new
NioDatagramAcceptor(Executors.newCachedThreadPool());
acceptor.setHandler(new DataMonitorHandler(this));
executor = Executors.newCachedThreadPool();
DefaultIoFilterChainBuilder chain = acceptor.getFilterChain();
chain.addLast("logger", new LoggingFilter());
chain.addLast("protocoladaptor", new ProtocolCodecFilter(new
BroadcastEventCodecFactory(false)));
//chain.addLast("threadPool", new ExecutorFilter(executor));
DatagramSessionConfig dcfg = acceptor.getSessionConfig();
dcfg.setIdleTime(IdleStatus.BOTH_IDLE, IDLE_TIME); //
doesn't do anything
dcfg.setReuseAddress(true);
acceptor.bind(new InetSocketAddress(PORT));
When data starts being sent to the port, an IoSession is created, as per
the documentation. All is fine, except data is transmitted to the
server only periodically, and sometimes there is 3 or even 4 minutes
before next batch of data comes along. In the meantime, my
DataMonitorHandler receives a sessionClosed. My question is this, How
do I set this up so I only receive the sessionClosed() after 20 minutes
of inactivity? The setIdleTime() has no effect on this.
Thanks.
GWB