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. 与JS报错的那段时光

    1.Uncaught SyntaxError: Unexpected end of input js报错: 翻译:语法错误:输入意外终止 原因:页面代码写的不规范  ╮(╯▽╰)╭ 其中的某条语句,没 ...

  2. string参考

    #include <iostream> #include <string.h> class string { private: char *data; public: stri ...

  3. JPA中遇到一些异常的分析与解决

    Spring Data JPA踩坑到填坑:1 JPA多对多关 //作者表 //书籍表 Book和Author是多对多关系 先放两张图做个说明:Jpa底层依赖于hibernate,hibernate默认 ...

  4. ajax 实战使用

    注意ajax 必须放在script脚本中使用 ajax用于前端朝后端提交数据,并且后端函数处理好结果返回给success函数作为回调函数给前端,前端拿到后端传来的值,比如code==0 来做相应的前端 ...

  5. 管理mysql

    要管理MySQL,可以使用可视化图形界面MySQL Workbench. MySQL Workbench可以用可视化的方式查询.创建和修改数据库表,但是,归根到底,MySQL Workbench是一个 ...

  6. thinkphp整合后台模板

    将后台模板源码dist文件夹中的所有文件移动到thinkphp view index中 thinkphp的资源文件都不是从view文件夹下读取的 因此需要资源文件asset文件夹和demo文件夹放到t ...

  7. 调用JavaScript实现字符串计算器

    调用JavaScript实现字符串计算器 如果表达式是字符串的形式,那么一般我们求值都会遇到很大的问题.   这里有一种直接调用JavaScript的方法来返回数值,无疑神器. 代码如下: @Fros ...

  8. 一个类似indexOf()的功能的函数

    之前面试的时候遇到了这样的一道题,不过写的时候有些细节没注意到,现在重新写了一下. 写一个类似indexOf()的功能的函数 var str = "dafdfgvdahjfbhyuyvtur ...

  9. (转)openfire插件开发(一)

    转:http://blog.csdn.net/lovexieyuan520/article/details/37774909 1. 在上一篇博文中,我介绍了Openfire3.9.3源代码导入ecli ...

  10. django-filters,rangefilter的用法,不在某个范围内

    找了好久在网上都没找到完整的示例代码,东拼西凑,连蒙带猜出来一句. not_in=django_filters.NumericRangeFilter(field_name="pid" ...