[sr-dev] [Fwd: Re: [Kamailio-Users] TCP supervisor process in Kamailio]
Andrei Pelinescu-Onciul
andrei at iptel.org
Thu Jul 9 16:24:37 CEST 2009
On Jul 09, 2009 at 16:18, Klaus Darilion <klaus.mailinglists at pernau.at> wrote:
> Hi Andrei!
>
> Thanks for the detailed description, we should put it on the wiki.
>
> Andrei Pelinescu-Onciul wrote:
> >In async mode the send never blocks (with the same disclaimers as for
> >the non-blocking read). If no "real" send happens for tcp_send_timeout
> >(or tcp_connect_timeout if this is a not yet connected connection),
> >the connection will be closed, a failure will be reported and the
> >destination will be blacklisted. Same thing happens if the per
>
> So, how does send_timeout work in async mode? The write is non-blocking,
> that means the kernel accepts the data and the write/send function
> returns immediately. Now, the kernel tries to send the data for
> send_timeout seconds. If this fails, what happens now? Is there a
> callback from kernel to ser or does ser somehow poll if the sending was
> successful?
No, it does not work for data already queued in the kernel, only for
data queued in ser. So it's in fact the timeout for moving data from ser
buffers to kernel buffers and not a "on-the-wire" timeout.
In fact even in non-async mode the send_timeout is the same thing
(timeout for moving the data into the kernel socket buffers and not the
real send timeout).
We have real send timeouts only for sctp.
Andrei
More information about the sr-dev
mailing list