softprops / hyperlocal

🔌 ✨rustlang hyper bindings for local unix domain sockets
MIT License
227 stars 46 forks source link

export `UnixStream` for clients #53

Closed fnichol closed 1 week ago

fnichol commented 2 years ago

Hi there!

I'm making some good use of this adapter to integrate hyper HTTP client connections with some upgrading to WebSockets via tungstenite and while creating my wrapper client I found myself needing to express the underlying Stream type over which hyper was communicating. In the typical TCP/HTTP case this would be a TcpStream, but in using a UnixConnector, the underlying stream type is UnixStream.

By exporting the UnixStream type, I was unblocked to being able to describe my type (it's using some generics, hence the reason) and happily off to the races. I noticed that having this type be pub has come up before, so if this looks like a good approach I'm happy to alter/add/amend this change to upstream it.

Thank you so much! 🎉

Resolves #50

softprops commented 1 week ago

captured in https://github.com/softprops/hyperlocal/pull/60