2011-04-12 92 views

回答

6

man 2 send

的插槽上都標非阻塞和請求的操作將阻塞。 POSIX.1-2001允許這種情況下將返回錯誤要麼,並且不需要這個常數[EAGAIN EWOULDBLOCK]具有相同的價值,所以便攜式應用程序應該檢查這兩種可能性。

所以,我覺得EAGAIN手段:be careful, the message did not fit into send buffer, this call would be blocked in normal (blocking) mode. Use select(2) to determine whether you can send more data.

附:事實上,看起來呼叫失敗了,什麼都沒有完成。

2

什麼都未完成。

如果事情完成後,返回值會告訴你許多人物是如何發送。當你返回值-1,並將errno = EAGAIN,什麼也沒有送。