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

recv timeout



On Sep 24, 2004, at 11:57 AM, Steve Holle wrote:

> I have a simple socket application and I would like to timeout recv 
> after a fixed period of inactivity.  I found an article showing how to 
> do it using select but I am under the impression this is not 
> supported.
>
> What would be the best way to accomplish the timeout.

select() works with sockets, but is a very expensive call.  A better 
technique is to use the SO_RCVTIMEO socket option.

-- 
Eric Norum <norume at aps.anl.gov>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793