Skip to content

Fix vectored IO for TcpStream #941

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

Merged
merged 1 commit into from
Jan 20, 2021
Merged

Conversation

theo3
Copy link
Contributor

@theo3 theo3 commented Jan 19, 2021

This change implements Write::poll_write_vectored and Read::poll_read_vectored on TcpStream using the vectored IO methods on the underlying stream. Previously, the Write and Read traits' default implementations were used, which just called poll_write and poll_read once for each IoSlice.

This change correctly results in readv and writev syscalls on Linux.

Implements `Write::poll_write_vectored` and `Read::poll_read_vectored`
on `TcpStream` using the vectored IO methods on the underlying stream.
Previously, the trait's default implementation was used, which just
called `poll_write` and `poll_read` once for each `IoSlice`.
Copy link
Member

@dignifiedquire dignifiedquire left a comment

Choose a reason for hiding this comment

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

thanks

@dignifiedquire dignifiedquire merged commit af66efe into async-rs:master Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants