2011/7/23 ZHOU Xiaobo [off-list ref]:
question No1:
When I call
ssize_t write(int fd, const void *buf, size_t count);
on a nonblocking UDP socket, is the return value always equal to 'count'?
I don't think so. The function may be interrupt by signal or return
due to other reason, so the return value only represents the size it
writes successfully to the fd.
question No2:
Can I write() a UDP socket in multiple threads without locking?
In my opinion, you could. However, the receiver may not get what you expected.
thanks
------------------
Sincerely yours
ZHOU Xiaobo