I have some ideas on this. Maybe relevant. How about using IoSession.sessionIdle() to do the timeout at the server side. You can keep track of the time you last got data from that IoSession. After proper timeout, just close the IoSession.
-----Original Message----- From: Gregory Brownell [mailto:[email protected]] Sent: Thursday, January 29, 2009 7:20 PM To: [email protected] Subject: Re: IoSession timeout Ashish, Thanks again for looking into this. Note that this is a receive only application. The device(s) sending the packets have no capability to read anything. So I don't need to worry about writing at all. What's important here is the timeout. I suppose I could just write a timer that times out after N minutes and is interrupted and reset after each packet is received, and not worry about session closing/recycling. But when I think about how to handle this with multiple clients opening and closing all the time I get a headache. Greg. Ashish wrote: > On Thu, Jan 29, 2009 at 6:31 PM, Gregory Brownell > <[email protected]> wrote: > >> Thanks for looking in to this Ashish. On your questions, I suppose a >> session isn't necessary, but I'm not aware of how to set this up without it. >> Can you point me somewhere? >> >> In any case, I'd like to be able to change the session timeout. >> > > try setting custom session recycler. Was not able to prototype much. > Will try to look during weekend, if can spare sometime > > To answer your query, can try this > 1. Configure valid clients in your server (static or dynamic) > 2. Maintain health state of the clients > 3. If session is active, reply on the session, else use an IoConnector > to send data to client (you may need an acceptor at client end) not a > very good design :-( > > Let me put in some thoughts and see if I can think of a better solution > > Good Luck :-) > . > > Important notice:This e-mail and any attachment thereto contains corporate proprietary information. If you have received it by mistake, please notify us immediately by reply e-mail and delete this e-mail and its attachments from your system. Thank You.
