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()函数将创建的套接口与服务器地址绑 ...
随机推荐
- SpringBoot传递单一参数时@RequestParam和@RequestBody的区
用SpringBoot框架做项目时,经常需要前端给后端传递参数,如果需要多条参数,通常的做法是把这些参数封装为一个对象来传递,前端用POST方式调用.但有时会遇到后端只需要一条参数(比如一个Strin ...
- proc伪文件系统 - 加载一个进程
内核模块的编译方法及注意事项 Ubuntu内核(2.6.32) 2.6内核中,模块的编译需要配置过的内核源码:编译.链接后生成的内核模块后缀为.ko:编译过程首先会到内核源码目录下读取顶层的Makef ...
- if (user?.Identity?.IsAuthenticated ?? false)这几个问号分别都代表啥意思?
if (user?.Identity?.IsAuthenticated ?? false)这几个问号分别都代表啥意思? 0 悬赏园豆:5 [已解决问题] 浏览: 229次 解决于 2018-05-16 ...
- Hibernate4教程二:基本配置(3)
被映射的类必须定义对应数据库表主键字段.大多数类有一个JavaBeans风格的属性, 为每一个实例包含唯一的标识.<id> 元素定义了该属性到数据库表主键字段的映射. java代码: &l ...
- START TRANSACTION - 开始一个事务块
SYNOPSIS START TRANSACTION [ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ...
- mysql几个常见错误记录
select时找不到表:大小写问题 show variables like '%lower_case_table_names%'; MySQL表名大小写敏感导致的问题 使用help_topic时的se ...
- matlab 生成.exe文件 转
本文链接:https://blog.csdn.net/qq_20823641/article/details/51863737 如何将MATLAB程序编译成独立可执行的程序?如何将编译好的独立可执行程 ...
- 36.两个链表的第一个公共结点(python)
题目描述 输入两个链表,找出它们的第一个公共结点. class Solution: def FindFirstCommonNode(self, pHead1, pHead2): # write cod ...
- Goaccess的简单使用
goaccess了,它是一个日志分析工具,并不只是为nginx使用的,你也可以用它来分析apache,具有解析速度快,使用简单,能生成json,html,csv等特点. 1.goaccess的基本安装 ...
- Java 基础 - 基本类型 & 包装类型
基本数据类型和包装类的区别 定义不同.包装类属于对象,基本数据类型不是 声明和使用方式不同.包装类使用new初始化,有些集合类的定义不能使用基本数据类型,例如 ArrayList<Integer ...