How will my program differ in behavior if I use non-blocking sockets with a select() call as opposed to using blocking sockets with a select() call?
Asked
Active
Viewed 7,913 times
2 Answers
7
The select
polling will not behave differently, only the receive/send functionality will differ between blocking/non-blocking sockets.

Some programmer dude
- 400,186
- 35
- 402
- 621
-
So it does not make sense to use blocking sockets with a select call , right? Or is there a use case for this? – DaTaBomB Feb 24 '13 at 17:40
4
select()
won't behave differently. read()
, write()
, accept()
and other I/O functions will -- they will never block on non-blocking sockets, while they might block even if select()
tells they would not, although this is somewhat rare.
https://stackoverflow.com/a/5352634/259543
Not sure whether this behavior is allowed by POSIX, though.