SO_RCVTIMEO
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > SO_RCVTIMEO




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    SO_RCVTIMEO  
gio


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-22-06 06:17 PM

Hi all, I'm working on a client-server whit posix.
I use setsockopt(...,...., SO_RCVTIMEO,....) ; and for process  works
but at thread level doesn't work. Someone can tell me why?
thanks






[ Post a follow-up to this message ]



    Re: SO_RCVTIMEO  
Maxim Yegorushkin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-22-06 06:17 PM

gio wrote:
> Hi all, I'm working on a client-server whit posix.
> I use setsockopt(...,...., SO_RCVTIMEO,....) ; and for process  works
> but at thread level doesn't work.

Do you set this option for each and every socket you'd like to timeout?

> Someone can tell me why?

It could be because socket options apply to that particular socket
which you specify as the first argument in setsockopt() call. Rather
than to a process or a thread.






[ Post a follow-up to this message ]



    Re: SO_RCVTIMEO  
Rick Jones


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-23-06 12:21 AM

Not all "unixes" fully support SO_RCVTIMEO.  Some may have that
defined, but it may be a noop.

If you want to make sure that one does not block waiting for data on a
socket, the much more portable way to go is to use either select() or
poll() and a non-blocking socket.

rick jones
--
The glass is neither half-empty nor half-full. The glass has a leak.
The real question is "Can it be patched?"
these opinions are mine, all mine; HP might not want them anyway... 
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:21 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register