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.
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.
相关文章推荐
- ExtJs布局之Column
- 和我一起看API(一)你所不知道的LinearLayout补充
- 阅读程序回答问题
- RedHat 6 系统 使用网易源
- 工厂方法模式(Factory Method)
- getloadavg()函数
- uva11825Hackers' Crackdown
- 编写c#程序,输出平均分和高于平均分的同学
- 基本标签(一)
- [教程] 从png到ico
- stdlib 头文件
- 10 条有趣的 Linux 命令
- HDOJ 5645 DZY Loves Balls
- hdoj RPG的错排 2068 (数学&错排公式)
- 用两个栈实现队列
- IndiaHacks 2016 - Online Edition (Div. 1 + Div. 2) A B C
- Java 8新特性探究(九)跟OOM:Permgen说再见吧
- Android中RecyclerView的使用
- 支持向量机理解
- Nginx的安装,启动,停止,日志分割,从容停止,平滑升级