Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在非阻塞模式下使用套接字,客户端连续向服务器发送数据,虽然我为套接字设置的缓冲区足够大以保存来自客户端的所有数据但Ewouldblock总是抛出,我不知道为什么,你能详细解释一下吗关于这个 Ewouldblock。
EWOULDBLOCK 表示发送时套接字发送缓冲区已满,或者接收时套接字接收缓冲区为空。您应该使用select()来检测这些条件何时变为错误。
select()