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

tcp: remove shutdown() fn on TcpStream in favor of AsyncWrite::shutdown() #3294

Closed
carllerche opened this issue Dec 18, 2020 · 4 comments · Fixed by #3298
Closed

tcp: remove shutdown() fn on TcpStream in favor of AsyncWrite::shutdown() #3294

carllerche opened this issue Dec 18, 2020 · 4 comments · Fixed by #3298
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-net Module: tokio/net
Milestone

Comments

@carllerche
Copy link
Member

carllerche commented Dec 18, 2020

The trait function calls shutdown(WRITE). The duplication is confusing and causes some naming conflicts.

Access to the syscall is available by accessing the std socket and calling shutdown() on that.

This would also apply to UnixStream

@carllerche carllerche added A-tokio Area: The main tokio crate C-feature-request Category: A feature request. labels Dec 18, 2020
@carllerche carllerche added this to the v1.0 milestone Dec 18, 2020
@Darksonn Darksonn added the M-net Module: tokio/net label Dec 18, 2020
@aknuds1
Copy link
Contributor

aknuds1 commented Dec 19, 2020

Is this still relevant if #3291 gets closed, since AsyncWrite doesn't have the shutdown method yet?

@Darksonn
Copy link
Contributor

Yes. The method is just on AsyncWriteExt instead.

@aknuds1
Copy link
Contributor

aknuds1 commented Dec 19, 2020

@Darksonn Thanks for clarifying!

@aknuds1
Copy link
Contributor

aknuds1 commented Dec 19, 2020

I'll look into solving this.

carllerche pushed a commit that referenced this issue Dec 19, 2020
`shutdown()` on `AsyncWrite` performs a TCP shutdown. This avoids method
conflicts.

Closes #3294
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 C-feature-request Category: A feature request. M-net Module: tokio/net
Projects
None yet
3 participants