Re: Keep alive

Holger Schurig <[email protected]>
Newsgroups gmane.comp.emulators.tn5250
Message-ID <[email protected]>
> setsockopt() should have an option called SO_KEEPALIVE to
> enable keepalives at the TCP level.  Is this really what Mark
> is looking for, though?   I mean, I know they have the same
> name -- but are they the same thing?

I'm using

   setsockopt(socketdev->socket(), SOL_SOCKET, SO_KEEPALIVE, 
&optval, sizeof(optval));

in one of my project, but this keep-alive is at a lower ISO-level 
than we need here. It basically tells the TCP/IP of Linux (BSD, 
etc) to every so often send a ACK for a null-data-area.

I had to use it to circumvent a broken firewall. The firewall had 
a very low TCP-session timeout (1 hour or so) and after this one 
hour without traffic the firewall was closing the connection, 
but not sending any rejection messages back. So Linux didn't 
knew and kept retrying the TCP-Packets. And with the exponential 
backoff time and a retry count of 13 this then took around 30 
minutes until user-space was notified about the problem.

So I turned TCP-Level keepalive on, this helped with that case.



However, an AS/400 has some system configuration where the 
machine can be told to terminate a running session if there 
hasn't been some data exchange for some time. A TCP-level 
keep-alive won't help here.

Maybe a TELNET-level NOOP or KEEPALIVE will help here, I haven't 
tested this yet.
-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.