Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

add support for Read + Write for TcpStream and UnixStream #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vavrusa
Copy link

@vavrusa vavrusa commented Aug 2, 2019

There is no way to convert stream objects to their underlying type, but in some cases it's useful to be able to perform blocking I/O, such as when wrapped in stream that handles WouldBlock error in some way.

The specific use case for this is https://github.com/dbcfd/tls-async which works around the issue using Compat<S> where S: AsyncRead + AsyncWrite, which implements 0.1 Futures Stream. However this won't work outside of 0.1 executor (e.g. Tokio), which makes the usage with Romio awkward. I'm not sure what's the best solution here, but I would assume reexporting mio interfaces is acceptable. This would allow the depending library to use Read + Write directly.

There is no way to convert stream objects to their underlying type,
but in some cases it's useful to be able to perform blocking I/O, such as
when wrapped in stream that handles WouldBlock error in some way.
@yoshuawuyts yoshuawuyts force-pushed the master branch 2 times, most recently from a989815 to 617f76d Compare September 23, 2019 10:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant