On Wed, Jan 28, 2009 at 11:29 PM, Gregory Brownell <[email protected]> wrote: > 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
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. Hmm.. Looking into this, shall revert back in a while -- thanks ashish Blog: http://www.ashishpaliwal.com/blog My Photo Galleries: http://www.pbase.com/ashishpaliwal
