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(bin): don't allocate in server UDP recv path #2202

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Commits on Oct 26, 2024

  1. feat(bin): don't allocate in server UDP recv path

    Previously the `neqo-bin` server would read a set of
    datagrams from the socket and allocate them:
    
    ``` rust
    let dgrams: Vec<Datagram> = dgrams.map(|d| d.to_owned()).collect();
    ```
    
    This was done out of convenience, as handling `Datagram<&[u8]>`s, each borrowing
    from `self.recv_buf`, is hard to get right across multiple `&mut self`
    functions, that is here `self.run`, `self.process` and `self.find_socket`.
    
    This commit combines `self.process` and `self.find_socket` and passes a socket
    index, instead of the read `Datagram`s from `self.run` to `self.process`, thus
    making the Rust borrow checker happy to handle borrowing `Datagram<&[u8]>`s
    instead of owning `Datagram`s.
    mxinden committed Oct 26, 2024
    Configuration menu
    Copy the full SHA
    12bb957 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2024

  1. next().or_else()

    mxinden committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    d23aa74 View commit details
    Browse the repository at this point in the history
  2. re-introduce find_socket

    mxinden committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    786c616 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2024

  1. Simplify process loops

    mxinden committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    91c7920 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2024

  1. Configuration menu
    Copy the full SHA
    1b7ce8f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aa3f81e View commit details
    Browse the repository at this point in the history
  3. Reduce diff

    mxinden committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    c727c63 View commit details
    Browse the repository at this point in the history