2001-02-13 00:38:39

by Chris Evans

[permalink] [raw]
Subject: SO_RCVTIMEO, SO_SNDTIMEO


Hi,

I notice the entities in the subject line have appeared in Linux 2.4.

What is their functional specification? I guess they trigger if no bytes
are received/send within a consecutive period. How does the app get the
error? -EPIPE for a blocking read/write? If so, does SIGPIPE
get raised? Or is -ETIMEDOUT used? ...

TIA,
Chris


2001-02-13 10:20:02

by Steven Whitehouse

[permalink] [raw]
Subject: Re: SO_RCVTIMEO, SO_SNDTIMEO

Hi,

They are the maximum amount of time that a send or receive call will
block for. The standard socket error returns apply, so if data has
been sent or received, then the return value will be the amount of
data transferred; if no data has been transferred and the timeout
has been reached then -1 is returned with errno=EAGAIN just as if the socket
was specified to be nonblocking. If the timeout is set to zero (the default)
then the operation will never timeout.

Steve.

>
>
> Hi,
>
> I notice the entities in the subject line have appeared in Linux 2.4.
>
> What is their functional specification? I guess they trigger if no bytes
> are received/send within a consecutive period. How does the app get the
> error? -EPIPE for a blocking read/write? If so, does SIGPIPE
> get raised? Or is -ETIMEDOUT used? ...
>
> TIA,
> Chris
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://vger.kernel.org/lkml/
>