in reply to Help with socket connections

Is it possible to monitor the state of the connection, checking whether or not it's idle? It'd then just be a case of setting a local alarm if an idle is detected, and if the alarm goes off, trapping the signal and killing the session.

I'm assuming that if you're acting as a proxy you read the command and write it out .. so tracking the idle-state should be relatively straightforward.

Just an idea ..
--Foxcub

Replies are listed 'Best First'.
Re: Re: Help with socket connections
by Clownburner (Monk) on Nov 01, 2002 at 20:30 UTC
    I can't do that. First of all, the proxy is for telnet, so it's byte-by-byte, and secondly, I don't know how long the user will stare at the screen, waiting to type something. It could easily be 20 minutes, and I'd rather not nail the CPU at 100% while I'm waiting. There has to be some way to determine why the TCP connection isn't closing in a timely fashion and cleaning that up.
    "Non sequitur. Your facts are un-coordinated." - Nomad