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

Add TcpStream::shutdown #7126

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add TcpStream::shutdown #7126

wants to merge 2 commits into from

Conversation

al8n
Copy link
Contributor

@al8n al8n commented Jan 26, 2025

Hi, mio has TcpStream::shutdown but tokio's TcpStream is missing this method.

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-net Module: tokio/net labels Jan 26, 2025
@Darksonn
Copy link
Contributor

This is available via AsyncReadExt::shutdown.

@al8n
Copy link
Contributor Author

al8n commented Jan 30, 2025

This is available via AsyncReadExt::shutdown.

Yes, but the shutdown method in AsyncWriteExt requires the &mut self, which is not compatible with std::net::TcpStream::shutdown(&self, how).

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.

2 participants