什么是阅读()和recv()之间的差值,并发送()和写()? [英] What is the Difference Between read() and recv() , and Between send() and write()?

查看:98
本文介绍了什么是阅读()和recv()之间的差值,并发送()和写()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是阅读()和recv()之间的差异,并发送()和套接字编程写()?性能和速度等行为。

what is the difference between read() and recv() , and between send() and write() in socket programming ? performance and speed and other behavior.

推荐答案

唯一的区别是,的recv /送让你指定为实际操作的某些选项。读/写是'万能'的文件描述符功能,同时的recv /发送稍微更专门的(例如,你可以设置一个标志,忽略SIGPIPE,或发出带外的消息...)。

The only difference is that recv/send let you specify certain options for the actual operation . read/write are the 'universal' file descriptor functions while recv/send are slightly more specialized (for instance, you can set a flag to ignore SIGPIPE, or to send out-of-band messages...).

这篇关于什么是阅读()和recv()之间的差值,并发送()和写()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆