in reply to Re^4: golf challenge: one-liner netcat clone
in thread golf challenge: one-liner netcat clone
Yes, you're right, the select (or more precisely, the if vec) takes care of that.
So yes, you don't need to make the *read* handle non-blocking because of that check.
You do need to continue making the *write* handles non-blocking because you don't have a similar check around syswrite. (Note that the similar check for write handles involves checking how many bytes you can write without blocking.)
Sorry, I got confused by the lack of symmetry between your reading and writing code.
|
|---|