[Libwebsockets] TCP KeepAlive Question

"Andy Green (林安廸)" andy at warmcat.com
Fri Feb 22 02:22:38 CET 2013


On 22/02/13 07:05, the mail apparently from Larry Hayes included:
> 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?

Well spotted, yes they are switched

http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/commit/?id=bb66ac6ec13092d5f7ef2f8a199605fc95e25cba

thanks for the report.

-Andy

>          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
>
>
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> http://ml.libwebsockets.org/mailman/listinfo/libwebsockets
>




More information about the Libwebsockets mailing list