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.
如何阅读send(sock_fd, line, size, 0);
send(sock_fd, line, size, 0);
我有一个这样的程序,
if (send(new_socket,sendToEMVSS,EMVSSSendBufferLength,0)!=EMVSSSendBufferLength)
我尝试运行程序,但结果总是!=EMVSSSendBufferLength
!=EMVSSSendBufferLength
您确实需要保留返回值。
errno
EMVSSSendBufferLength
errno == EAGAIN
数据包真的是固定大小的吗?您是否没有错误地传递缓冲区的大小而不是实际消息的大小?