recv timeout

Angelo Fraietta afraiett at bigpond.net.au
Sun Sep 26 19:09:17 UTC 2004


Eric Norum wrote:

>
> 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.
>

Do you have an example or code snippet using it?.

-- 
Angelo Fraietta

PO Box 859
Hamilton NSW 2303

Home Page


http://www.users.bigpond.com/angelo_f/

There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
    Bernard of Clairvaux (1090 - 1153)






More information about the users mailing list