quinn icon indicating copy to clipboard operation
quinn copied to clipboard

proto: write outgoing packets to caller-supplied memory

Open Ralith opened this issue 5 years ago • 0 comments

Connection::poll_transmit allocates and immediately returns a Vec<u8>. There's no reason it couldn't instead take a &mut [MaybeUninit<u8>] or similar, giving the caller much greater flexibility to reduce allocations/copies, particularly when working with e.g. registered io_uring buffers.

Ralith avatar Apr 22 '20 23:04 Ralith