您的位置:首页 > 其它

recvmsg 断包问题

2016-03-21 22:13 176 查看
The recvmsg()
function shall return the total length of the message. For message-based sockets, such as SOCK_DGRAM and SOCK_SEQPACKET, the entire message shall be read in a single operation. If a message is too long to fit in the supplied buffers, and MSG_PEEK is not set
in the flags argument, the excess bytes shall be discarded,
and MSG_TRUNC shall be set in the msg_flags member of the msghdr structure.For
stream-based sockets, such as SOCK_STREAM, message boundaries shall be ignored. In this case, data shall be returned to the user as soon as it becomes available, and no data shall be discarded.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: