SOCK_SEQPACKE
The SOCK_SEQPACKET socket type is similar to the SOCK_STREAM type, and is also connection-oriented. The only difference between these types is that record boundaries are maintained using the SOCK_SEQPACKET type. A record can be sent using one or more output operations and received using one or more input operations, but a single operation never transfers parts of more than one record. Record boundaries are visible to the receiver via the MSG_EOR flag in the received message flags returned by the recvmsg() function. It is protocol-specific whether a maximum record size is imposed
It seems there's atleast 3 different local/unix socket types (PF_UNIX) , SOCK_STREAM, SOCK_DGRAM and SOCK_SEQPACKET.
While I know that a SOCK_STREAM gives you a bi-directional byte stream, like TCP or a bidirectional pipe, and the other two gives you a messge/packet API, what's the difference between a unix socket of SOCK_DGRAM and SOCK_SEQPACKET ?
As these are local only, I can't think of a good reason someone would implement SOCK_DGRAM in a manner it could reorder packets.
Also, does SOCK_DGRAM/SOCK_SEQPACKET employ flow control, or can messages be dropped in case of slow readers ?
SOCK_SEQPACKE的更多相关文章
- linux c编程:网络编程
在网络上,通信服务都是采用C/S机制,也就是客户端/服务器机制.流程可以参考下图: 服务器端工作流程: 使用socket()函数创建服务器端通信套接口 使用bind()函数将创建的套接口与服务器地址绑 ...
随机推荐
- c# 盖尔-沙普利算法的改进
盖尔-沙普利算法 “盖尔-沙普利算法”(the Gale-Shapley algorithm),也被称为“延迟接受算法”(deferred-acceptance algorithm),简称“GS算法” ...
- Pytest---yield
场景:你已经可以将测试方法前要执行的或依赖的解决了,测试 方法后销毁清除数据的要如何进行呢?范围是模块级别的.类似 setupClass 解决:通过在同一模块中加入 yield关键字,yield是调用 ...
- PyCharm与git/GitHub取消关联
如果你从github 上down下的个项目,用pycharm 打开的时候,选择了git管理,导致你只要做了修改,就会有颜失标记,即使没有强迫症,看着也很难受啊 聪敏的我赶快找度娘,总结如下解决方法 在 ...
- 案例- CSS 三角加强
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 【javascript闭包】转载一篇不错的解释,也有几个大牛的链接
初学闭包时一直以为很简单.但伴随对一个问题深入学习后,才算真正理解了闭包,同时也发现连<<JavaScript高级程序设计>>中都些不准确的地方. 我不准备从头介绍闭包的概念, ...
- vue 父子组件数据双向绑定
父组件 <find-search v-model="searchshow"></find-search> 子组件 props: { value: { typ ...
- 40th 要掀桌子么 还是尬坐吧
今日学习精华: 面向对象编程里面有一句 非常经典的描述:-----通过类实例化一个对象,通过对象调方法----- 注意:对象调用的 方法 ,即 函数一定要有 参数 def ...
- Yii2 自定义组件
basic\components\HelloWidget namespace app\components; use yii\base\Widget; use yii\helpers\Html; cl ...
- linux 下vi与vim区别以及vim的使用
vi与vim vi编辑器是所有Unix及Linux系统下标准的编辑器,他就相当于windows系统中的记事本一样,它的强大不逊色于任何最新的文本编辑器.他是我们使用Linux系统不能缺少的工具.由于对 ...
- 127.0.0.1和localhost不能正确映射的问题
可能引起的问题: 检查:分别ping一下127.0.0.1和localhost 以上是正确演示,不匹配的话,ping localhost会返回: 解决方案: 可能1: 在浏览器中打开http://12 ...