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

net: add {Tcp, Unix}Stream::try_{read, write}_vectored #3761

Merged
merged 1 commit into from May 14, 2021

Conversation

Kestrer
Copy link
Contributor

@Kestrer Kestrer commented May 7, 2021

Motivation

try_read and try_write on these two types already exist, so it makes sense to add their vectored I/O counterparts. I needed this when implementing vectored writes on a shared TCP stream type (which makes use of writable/try_write instead of the AsyncWrite implementation).

Solution

Add these methods.

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-net Module: tokio/net labels May 8, 2021
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good to me.

@Darksonn Darksonn merged commit 0b93bd5 into tokio-rs:master May 14, 2021
@Darksonn Darksonn mentioned this pull request May 14, 2021
@Kestrer Kestrer deleted the vectored branch May 14, 2021 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-net Module: tokio/net
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants