Hello..
Im working on udp non-blocking socket. I looked around but I couldnt find any good article or example on it.. How do I have to set udp socket to non-blocking?
Thanks
Printable View
Hello..
Im working on udp non-blocking socket. I looked around but I couldnt find any good article or example on it.. How do I have to set udp socket to non-blocking?
Thanks
Well if you're using Linux anyway.Code:It is possible to do non-blocking IO on sockets by setting the O_NONBLOCK flag on a
socket file descriptor using fcntl(2). Then all operations that would block will
(usually) return with EAGAIN (operation should be retried later); connect(2) will
return EINPROGRESS error. The user can then wait for various events via poll(2) or
select(2).
If you're on fairly broken windows, you'd better say so.
Im on windows.
You could try ACE library, which is a portable network library:
http://www.cs.wustl.edu/~schmidt/ACE.html