-
Notifications
You must be signed in to change notification settings - Fork 735
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 from_std methods to TCP/Unix Stream/Listener #1124
Add from_std methods to TCP/Unix Stream/Listener #1124
Conversation
Can't this be implemented using |
Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
9210f25
to
ae6a33f
Compare
Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
@Thomasdezeeuw It's not critical to merge this, but IMO it is valuable to have an API for going from std -> mio in a portable way. Requiring going via raw conversions would require platform specific code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I entirely agree with the API, I think there will maybe misuses of it, but if upstream crates need it I'm OK with adding it.
Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
@Thomasdezeeuw Thanks for the review. All your comments have been addressed. I added a lot more around tests; each I/O resource now have tests that test the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small things, but this almost ready to be merged.
Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
Thanks! |
Motivation
#1029 removed the
from_std
methods on the TCP (Unix) Stream (Listener)resources. These methods are still needed in upstream libraries where creating
wrapped resources from standard types is needed.
Tokio: TcpListener::from_std
Signed-off-by: Kevin Leimkuhler kleimkuhler@icloud.com