[sr-dev] New module proposal: TCP keepalive
Daniel-Constantin Mierla
miconda at gmail.com
Wed Feb 4 18:58:38 CET 2015
Hello,
I think it would be good to use a more generic name for the module, such
as 'tcpops'.
In the future we may add other functions to tune the tcp connections.
Naming it tcp_keepalive bounds it to this single feature.
Cheers,
Daniel
On 04/02/15 18:50, Camille Oudot wrote:
> Hi,
>
> I'm currently working on a new module, that allows setting the TCP
> keepalive options by socket, on demand, through the kamailio cfg:
>
> https://github.com/kamailio/kamailio/tree/coudot/tcp_keepalive/modules/tcp_keepalive
>
> This allows turning this mechanism on only when needed during the
> whole lifetime of a SIP/TCP connection. In our case, this would be only
> during a media session, to efficiently detect a disconnection (clients
> are smartphones on mobile network). Then, disabling keepalive when the
> session ends allows to save on network traffic, and battery for the
> client.
>
> Setting the options on the socket is straightforward when the TCP
> worker owns the file descriptor, but it's more tricky when it does not.
> In the latter case, I've been re-using the core functions from
> pass_fd.c.
>
> Are the functions from pass_fd safe to use from modules? Apart from
> close()ing the fd after setting the sock options, is there anything to
> take care of in term of resource locking or releasing?
>
> Any feedback is appreciated.
>
> Cheers,
>
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
More information about the sr-dev
mailing list