![]() |
| | #1 |
| Registered User Join Date: May 2006
Posts: 630
| udp non-blocking sockets 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 |
| l2u is offline | |
| | #2 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,691
| 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. |
| Salem is offline | |
| | #3 |
| Registered User Join Date: May 2006
Posts: 630
| Im on windows. |
| l2u is offline | |
| | #4 |
| Registered User Join Date: Aug 2002 Location: Hermosa Beach, CA
Posts: 446
| You could try ACE library, which is a portable network library: http://www.cs.wustl.edu/~schmidt/ACE.html
__________________ The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows. |
| IfYouSaySo is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pros and Cons of blocking versus non-blocking sockets? | abachler | Networking/Device Communication | 4 | 05-08-2008 06:52 AM |
| Sockets and UDP problem | ally153 | C Programming | 5 | 03-20-2006 05:19 AM |
| multiple UDP sockets with select() | nkhambal | Networking/Device Communication | 2 | 01-17-2006 07:36 PM |
| Problems with UDP sockets | majoub | Networking/Device Communication | 9 | 04-30-2005 12:25 AM |
| Non blocking sockets | osal | Networking/Device Communication | 3 | 07-23-2004 06:16 PM |