Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(udp): return borrowed Datagram on receive #2188

Merged
merged 2 commits into from
Oct 21, 2024

Commits on Oct 20, 2024

  1. feat(udp): return borrowed Datagram on receive

    Previously `recv_inner` would return `Datagram<Vec<u8>>`. In other words, it
    would allocate a new `Vec<u8>` for each UDP datagram payload.
    
    Now `recv_inner` reads into a provided buffer and returns `Datagram<&[u8]>`,
    i.e. it returns a view into the provided buffer without allocating.
    mxinden committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    534db5f View commit details
    Browse the repository at this point in the history
  2. feat(bin): don't allocate in UDP recv path (#2189)

    Pass a long lived receive buffer to `neqo_udp::recv_inner`, receiving an
    iterator of `Datagram<&[u8]>`s pointing into that buffer, thus no longer
    allocating in UDP receive path.
    mxinden committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    1030d1b View commit details
    Browse the repository at this point in the history