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()函数将创建的套接口与服务器地址绑 ...
随机推荐
- 七牛云关联Windows图床
1. 注册七牛云 七牛云 地址,需要在这里进行注册 2.完成实名认证 需要上传身份证的正反面以及支付宝做一下认证即可. 首先进入个人中心 然后进行实名认证 由于我已经认证过了,所以显示认证完成,未认证 ...
- PHP 工厂模式浅析
//抽象出一个人的接口interface Person{ public function showInfo();}//继承于人的学生类class Student implements Person{ ...
- suffixes - 列出文件后缀。
DESCRIPTION [描述] 文件后缀与文件名之间以点(.)间隔,通常包括一个或多个字母. 我们用文件后缀来描述文件的内容.很多标准的实用程序,如编译器,以后缀来识别文件类型. make(1) 就 ...
- Linux面试基础(一)
Linux基本命令 man rm 查看命令帮助 tar cf 压缩文件 tar xf 解压缩 ping 查看是否能连接网络 rm 删除数据 find 搜索数 ...
- AD库转换为KiCAD库的方法
AD库转换为KiCAD库的方法 参照博主另外一篇文档: AD转换为KiCAD的方法,点击此处
- 安装python及编辑工具PyCharm
win10下安装python环境,安装编辑工具PyCharm 1.安装 pythonpython安装包下载地址https://www.python.org/ftp/python/3.8.0/pytho ...
- 总结下awk基本用法
命令格式: awk '{commands} [{other commands}]' awk 'condition{commands} [{other commands}]' 如:awk '$4==&q ...
- 请问如何实现字符串UTF8->BIG5,BIG5->UTF8。保证送分。-Java/JavaSE
请问如何实现字符串UTF8-> BIG5,BIG5-> UTF8. ------回答--------- ------其他回答(100分)--------- public String BI ...
- C++中的delete加深认识
delete操作: 我们在删除一个指针之后,编译器只会释放该指针所指向的内存空间,而不会删除这个指针本身. 1.假如你不去释放,那么该区域的内存始终不能被其他数据所使用.2.指向该内存的指针是个局部变 ...
- Dart编程实例 - Const 关键字
Dart编程实例 - Const 关键字 void main() { final v1 = 12; const v2 = 13; v2 = 12; } 本文转自:http://codingdict.c ...