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. oracle null+字符串问题

    select 10 + 10 + 10 from dual结果是30,完全没问题. select null + 10 + 10 from dual结果是空串,但期望的结果是20. select nvl ...

  2. 【教程】CentOS 7安装 最新版本Docker

    博主最近需要安装Docker,步骤如下: Docker安装官方地址:https://docs.docker.com/install/linux/docker-ce/centos/ 以下命令都是在roo ...

  3. JS对象 屏幕分辨率的高和宽 window.screen 对象包含有关用户屏幕的信息。 1. screen.height 返回屏幕分辨率的高 2. screen.width 返回屏幕分辨率的宽

    屏幕分辨率的高和宽 window.screen 对象包含有关用户屏幕的信息. 1. screen.height 返回屏幕分辨率的高 2. screen.width 返回屏幕分辨率的宽 注意: 1.单位 ...

  4. ORA-01000 error

    ORA-01000是最大开放游标错误,是Oracle数据库开发中极为常见的错误. 在Java的上下文中,当应用程序尝试打开更多ResultSet而不是数据库实例上的已配置游标时,会发生这种情况. 解决 ...

  5. _declspec(dllexport)和.def(转)

    节选自:windows下编译和使用动态库dll http://blog.eonew.cn/archives/865 Microsoft 在 Visual C++ 的 16 位编译器版本中引入了 __e ...

  6. Java多线程常用方法的使用

    Java多线程的常用方法基本分为:获取当前线程的操作,线程休眠sleep()方法,线程让步yield()方法,等待其他线程终止join()方法,线程停止的一系列方法. 一.获取当前线程的操作   1. ...

  7. Java中Map集合的基本功能

    Map基本方法: put方法: remove方法: isEmpty方法: . clear方法: containsKey方法: containsValue方法 size方法: get方法: keySet ...

  8. jQuery与Vue的区别、从jQuery到Vue框架优点总结

    一.两者的区别 1.数据与视图分离 2.数据驱动视图 二.从jQuery到Vue框架的总结 1.数据与视图分离,解耦 2.数据驱动视图,只关心数据,DOM操作已经被框架封装

  9. 关于nodejs+koa中的跨域问题与koa项目创建

    项目快速创建 -1. 安装koa-generator npm install -g koa-generator -2. 使用koa-generator生成koa2项目, koa2 test -3. 完 ...

  10. 自己写的一些Delphi常用函数

    今天在整理以前写过的代码,发现有些函数还是挺实用的,决定将其贴到Blog上,与众多好友一起分享.{*************************************************** ...