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

IntoRawFd implementations missing #1414

Closed
jethrogb opened this issue Aug 8, 2019 · 5 comments
Closed

IntoRawFd implementations missing #1414

jethrogb opened this issue Aug 8, 2019 · 5 comments

Comments

@jethrogb
Copy link

jethrogb commented Aug 8, 2019

Version

0.1.x

Subcrates

tokio-tcp

Description

TcpStream and TcpListener implement AsRawFd but not IntoRawFd. IntoRawFd is needed to drop the TcpStream or TcpListener without closing the connection.

(There's also no FromRawFd but these can be emulated using the from_std functions)

@carllerche carllerche added this to the v0.2 milestone Aug 9, 2019
@Selicre
Copy link

Selicre commented Aug 9, 2019

IIRC, I asked about this before and the issue was mio managing its own buffers. Does that mean that this is planned to be changed, and does this mean that you would be able to pass the socket to other applications?

@carllerche
Copy link
Member

My assumption is IntoRawFd is Unix only so that is fine.

@jethrogb
Copy link
Author

jethrogb commented Aug 9, 2019

I guess on Windows one would want to do the same with IntoRawHandle

@carllerche carllerche removed this from the v0.2 milestone Nov 22, 2019
@carllerche
Copy link
Member

We need mio 0.7 for this.

@carllerche
Copy link
Member

Blocked on mio 0.7. Adding this will be part of that updated. I don't think we need a dedicated issue open at the moment as progress is blocked.

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

No branches or pull requests

3 participants