gj icon indicating copy to clipboard operation
gj copied to clipboard

Re-export mio types / Abstract IO further

Open jnicholls opened this issue 8 years ago • 1 comments

gj shows a lot of promise (no pun intended!). It would be wise to reexport the mio tcp/unix types under gj so people do not have to link directly to mio (and ultimately run into version mismatch hell).

Also, it would be nice if e.g. the Stream did not directly take a TcpStream instance. For instance, I have a use case where I'd want to wrap the TcpSream with an SslStream from the openssl crate. In mio, I created an enum with a TcpStream variant and an SslStream<TcpStream> variant, and then implemented Evented, Read and Write on it. It fits perfectly into the mio event loop. Something along these lines for gj would be ideal so people can wrap the underlying stream type yet still register/use it with gj. Food for thought.

jnicholls avatar Jan 13 '16 15:01 jnicholls