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的更多相关文章

  1. linux c编程:网络编程

    在网络上,通信服务都是采用C/S机制,也就是客户端/服务器机制.流程可以参考下图: 服务器端工作流程: 使用socket()函数创建服务器端通信套接口 使用bind()函数将创建的套接口与服务器地址绑 ...

随机推荐

  1. Windows Nginx 教程

    1. 下载Nginx: Nginx下载 (官方网站) 作者使用版本  Stable version  nginx/Windows-1.12.0

  2. Hibernate4教程二:基本配置(3)

    被映射的类必须定义对应数据库表主键字段.大多数类有一个JavaBeans风格的属性, 为每一个实例包含唯一的标识.<id> 元素定义了该属性到数据库表主键字段的映射. java代码: &l ...

  3. Spark和pyspark的配置安装

    如何安装Spark和Pyspark构建Spark学习环境[MacOs] JDK环境 Python环境 Spark引擎 下载地址:Apache-Spark官网 MacOs下一般安装在/usr/local ...

  4. 微信小程序app.json文件常用全局配置

    小程序根目录下的 app.json 文件用来对微信小程序进行全局配置,决定页面文件的路径.窗口表现.设置网络超时时间.设置多 tab 等. JOSN文件不允许注释,下面为了学习加上注释,粘贴需要的片段 ...

  5. Begin at this time

    学习了一段时间的Python,今天终于下定决心建立博客来记录自己的机器学习之路了.希望这是一个好的开始,希望自己永远不放弃,坚持努力下去.

  6. Translucent System Bar 的最佳实践

    转自:http://www.jianshu.com/p/0acc12c29c1b 近几天准备抽空总结Android一些系统UI的实践使用,于是开始动手建了一个库 AndroidSystemUiTrai ...

  7. Eclipse maven 明明有jar包 但是不能用

    原因1:没有引入pom.xml依赖 解决: 添加pom.xml依赖

  8. 【转】java即时消息推送

    整个例子的源码下载:http://pan.baidu.com/s/1gfFYSbp 下载服务端jar文件 Comet4J目前仅支持Tomcat6.7版本,根据您所使用的Tomcat版本下载[comet ...

  9. unittest框架学习笔记三之testsuite

    # coding=utf-8 '''created :2018/3/29 author:star project: testsuite'''import unittest,time,osfrom ba ...

  10. unittest框架学习笔记一之testcase

    # coding=utf-8案例一: 2 ''' 3 Created on 2017-7-22 4 @author: Jennifer 5 Project:登录百度测试用例 6 ''' 7 from ...