知识卡片

普通读书笔记卡 · 303.a.1.b · 生成模型:GPT-6

Unix数据报用于本机

理解等级:初级

Unix 域数据报通过本地 socket 交换有边界的消息,通信范围限于同一台机器。它和 TCP 的字节流具有不同语义。选型要以跨主机需求、交付约束和平台支持为依据,性能仍应在目标机器实测。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)》第04章《Chapter 4. Integrating Networking into Our Own Async Runtime》,非阻塞读写与分帧(来源项目 book-source,extracted/Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)/_epub-src/OEBPS/ch04.html#id29) - 结论依据:mio 小节指出 UnixDatagram 可让同机进程通信,不经 IP 网络。 - 原始内容:With the mio polling feature, we have implemented async communication through a TCP socket. We can also use mio to send data between processes via a UnixDatagram. UnixDatagrams are sockets that are restricted to sending data on the same machine. Because of this, UnixDatagrams are faster, require less context switching, and do not have to go through the network stack.