V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Erichailong
V2EX  ›  C

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

  •  
  •   Erichailong · Apr 9, 2021 · 2040 views
    This topic created in 1851 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   ·   Solana   ·   737 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 20:45 · PVG 04:45 · LAX 13:45 · JFK 16:45
    ♥ Do have faith in what you're doing.