udp的sendmsg在不返回-1 errno=EMSGSIZE的情况下会不会返回值小于需要发送长度的情况

yuekun1172006 2016-11-27 01:50:15
请教下udp的sendmsg在不返回-1 errno=EMSGSIZE的情况下会不会返回值小于需要发送长度的情况
非阻塞io
...全文
497 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
yuekun1172006 2016-11-27
  • 打赏
  • 举报
回复
看到这么一句话关于sendto的 The value returned by sendto is the number of bytes sent, or -1 if there was an error. UDP datagrams are sent atomically, so unlike when writing to a TCP socket there is no need to wrap the function call in a loop to handle partially-sent data. 那么sendmsg呢

23,121

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧