>>
>> 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
>
> This is correct. When first message is received from a client, a new
> session is created
>
>> 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.
Seems it times-out after 60 sec, irrespective of the settings.
Well not sure if its a bug or the intended behavior.
The default setting for ExpiringSessionRecycler is being used, which
sets session timeout as 60.
Was trying to provide a work around by using a Custom Recycler, but it
didn't worked.
BTW, UDP being stateless there are other ways to handle this. I hope
the data doesn't have any correlation among them.
Any specific reason to use a session?