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?
The select polling will not behave differently, only the receive/send functionality will differ between blocking/non-blocking sockets.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With