-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 a to_std method for tokio's TcpStream #3031
Comments
It should be possible to impl I would be interested to hear what others think. cc @tokio-rs/maintainers |
Is the conversion fallible? |
Converting will require deregistering, which could fail. |
I do think that a conversion is valuable. The |
The absence of a way to convert from tokio TcpStream to std TcpStream is preventing me from updating from tokio 0.2 to 0.3. In my use case, I have a custom TcpStream that also reads RX timestamps from the socket in addition to the payload. I can use |
Maybe I can help on this? Even though I don't have much |
I was checking and I want to be sure... I see that the tcpStream is mapped in the mio library... should it extract the object from there and expose? |
Yeah, it should take out the mio |
Fixes: tokio-rs#3031 Signed-off-by: Fuyang Liu <liufuyang@users.noreply.github.com>
Fixes: tokio-rs#3031 Signed-off-by: Fuyang Liu <liufuyang@users.noreply.github.com>
Fixes: tokio-rs#3031 Signed-off-by: Fuyang Liu <liufuyang@users.noreply.github.com>
Is your feature request related to a problem? Please describe.
Cannot convert from a tokio TcpStream to a std one which allows the conversion to a socket2 socket which allows editing various params for a TcpStream
Describe the solution you'd like
Implement a
to_std
method for tokio's TcpStream.Describe alternatives you've considered
None considered
Additional context
None provided
The text was updated successfully, but these errors were encountered: