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

util: add writev-aware poll_write_buf #3156

Merged
merged 4 commits into from
Dec 3, 2020
Merged

Commits on Nov 20, 2020

  1. util: add poll_write_buf and write_buf

    This commit adds `poll_write_buf` and `write_buf` functions to
    `tokio_util::io`, analogous to the existing `poll_read_buf` and
    `read_buf` functions.
    
    These functions write from a `Buf` to an `AsyncWrite`, advancing the
    `Buf`'s internal cursor. In addition, when the `AsyncWrite` supports
    vectored writes (i.e. its `is_write_vectored` method returns `true`),
    they will use vectored IO.
    
    I copied the documentation for these functions from the docs from Tokio
    0.2's `AsyncWrite::poll_write_buf` and `AsyncWriteExt::write_buf`
    functions, with some minor modifications as appropriate.
    hawkw committed Nov 20, 2020
    Configuration menu
    Copy the full SHA
    f68d31f View commit details
    Browse the repository at this point in the history
  2. util: fix slightly wrong read_buf docs

    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw committed Nov 20, 2020
    Configuration menu
    Copy the full SHA
    45b7345 View commit details
    Browse the repository at this point in the history
  3. codec: use poll_write_buf

    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw committed Nov 20, 2020
    Configuration menu
    Copy the full SHA
    a124b06 View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2020

  1. util: back out write_buf function

    Instead, we'll add vectored write support to `tokio`'s
    `AsyncWriteExt::write_buf` method. This PR only adds `poll_write_buf`
    in `tokio-util`.
    
    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw committed Dec 3, 2020
    Configuration menu
    Copy the full SHA
    920bd43 View commit details
    Browse the repository at this point in the history