[Libwebsockets] TCP KeepAlive Question

Larry Hayes lhayesg at gmail.com
Fri Feb 22 00:05:17 CET 2013


Andy,

I am using v1.22, master has the same code.

I was looking at setting up TCP keep alive

Looking at libwebsocket.c it seems to conflict with my reading of how keep
alive should be setup.
Seems like interval and probes variables are switched?

        optval = context->ka_probes;
        if (setsockopt(fd, IPPROTO_IP, TCP_KEEPINTVL,
                         (const void *)&optval, optlen) < 0)
            return 1;

        optval = context->ka_interval;
        if (setsockopt(fd, IPPROTO_IP, TCP_KEEPCNT,
                         (const void *)&optval, optlen) < 0)
            return 1;

Larry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20130221/1028f495/attachment.html>


More information about the Libwebsockets mailing list