[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FTPAPI connection reset
Scott,
Getting back to this...
We looked at the iSeries side, CHGTCPA, the TCPKEEPALV parm was set to
6 minutes, we tried changing it to 2 without effect.
>From what I read here:
http://tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/#overview
It appears that the socket itself must be enable to use keep alive:
"All you need to enable keepalive for a specific socket is to set the
specific socket option on the socket itself. The prototype of the
function is as follows:
int setsockopt(int s, int level, int optname,
const void *optval, socklen_t optlen)
The first parameter is the socket, previously created with the
socket(2); the second one must be SOL_SOCKET, and the third must be
SO_KEEPALIVE . The fourth parameter must be a boolean integer value,
indicating that we want to enable the option, while the last is the
size of the value passed before. "
I see where you've prototype the setsockopt() along with the
SOL_SOCKET and SO_KEEPALIVE constants in SOCKET_H...but it doesn't
appear that you're calling it in the TCP_Conn() parameter.
Correct me if I'm wrong, but I understand the default for sockets to
_NOT_ use keepalive, so what I'd what to do is add some code to
TCP_Conn() to call setsockopt(). Might it also be a good idea to add
an FTP_EnableKeepalive(), setting a module variable that can be
checked in TCP_Conn, to minimize effects to existing users?
Thanks!
Charles
On Fri, Mar 2, 2012 at 3:12 AM, Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:
>
> But, all of your links discuss setting up keepalives on the command
> channel, and NOT trying to use NOOP during a transfer. I know that the
> dial-up modem situation I described earlier would ignore keep-alive
> packets (and so they would *not* keep the dial-up active.) But perhaps
> they'll work in the NAT situation.
>
> It'd be easy enough to try turning on keepalives to see if it would
> solve your problem, right?
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------