My understanding is that you would only want blocking write if you want to make sure the other side got the TCP packet once the write method returned
你的理解是不正确的.它无法确保这一点.
阻塞写入阻塞,直到所有数据都已传输到套接字发送缓冲区,从那里异步传输到网络.如果读取器很慢,他的套接字接收缓冲区将填满,这最终会导致套接字发送缓冲区填满,这将导致阻塞写入阻塞,阻塞整个线程.非阻塞I / O为您提供了一种检测和处理这种情况的方法.