Erichailong
V2EX  ›  C

Linux C UDP socket 中如何让其立即发包?

  •  
  •   Erichailong · Apr 9, 2021 · 2471 views
    This topic created in 2021 days ago, the information mentioned may be changed or developed.

    想使用UDP发包测试延迟,特别精准的那种,希望每次发包后立即发送,不缓存。

    1 replies  •  2021-04-09 11:06:46 +08:00
    zhengxiaowai
        1
    zhengxiaowai  
       Apr 9, 2021
    Datagrams can be sent immediately using sendto(2)
    or sendmsg(2) with a valid destination address as an argument.

    https://man7.org/linux/man-pages/man7/udp.7.html
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5910 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 02:03 · PVG 10:03 · LAX 19:03 · JFK 22:03
    ♥ Do have faith in what you're doing.