[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [linux] setsockopt SO_RCVTIMEO fonctionne ?



hola,

sur ma debian dans man 7 socket:
       SO_RCVTIMEO and SO_SNDTIMEO
              Specify the sending or receiving timeouts until reporting  an  error.   They
              are  fixed  to  a  protocol  specific setting in Linux and cannot be read or
              written. Their functionality can be emulated using alarm(2) or setitimer(2).

Je suppose donc que ta version des manpages est out of date ou alors que l'addition a été
faites par debian dans ses packages, je ne sais pas trop qui est l'upstream des manpages
(le groupe de gens en charge de leur maintenance ..)

JeF

On Fri, Mar 08, 2002 at 12:18:55PM +0100, Pascal Bleser wrote:
> Qqn a déjà essayé l'option (via setsockopt) SO_RCVTIMEO
> (time-out pour la réception) dans les sockets sous Linux 2.4 ?
> 
> Dans 2.2 et dans la manpage (man 7 socket), il fait mis que
> c'est pas supporté par Linux, qu'il faut passer par alarm.
> 
> Mais d'après les sources du kernel (2.4.10), on dirait que c'est
> bien implémenté...
> 
> D'après ce que j'ai trouvé sur une ML kernel:
> 
> "
> Chris Evans: "SO_RCVTIMEO, SO_SNDTIMEO"
> > 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? ...
> 
> 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.
> "
> 
> Donc on dirait que ça fonctionne bien entre-temps...
> 
> Si c'est bien le cas, c'est dommage que la man-page est out-dated sur un
> truc aussi important...
> 
> -- 
>   -o) Pascal Bleser   ATOS Origin/Aachen(DE) |
>   /\\         <pascal.bleser@atosorigin.com> |
>  _\_v <guru@linuxbe.org>                     |
> ---------------------------------------------|
> Jesus saves,Buddha makes incremental backups :
> ---------------------------------------------'
> 
> _______________________________________________
> Linux Mailing List
> Archives: http://unixtech.be/mailman/listinfo/linux
> 

-- 
-> Jean-Francois Dive
--> jef@linuxbe.org
_______________________________________________
Linux Mailing List
Archives: http://unixtech.be/mailman/listinfo/linux