Closed jen20 closed 4 years ago
I was just about to open an issue for this. I'm currently using this working branch of hyperlocal
to implement a custom Server
that serves on Unix domain sockets in a personal project. Converting the client Endpoint
, however, is comparatively less trivial.
I am on vacation right now but ill drop a hint at what I think the correct solution should be. We should provide a MakeConnection
builder option for both server and client. This MakeConnection
should allow us to swap out the underlying asyncread/write.
Over at https://github.com/akshayknarayan/tonic/commit/02defcd19dc6294de5c3e7f17d903c8aaef1bfef, I've written a temporary hack which addresses this issue in the same way as TLS support - a "unix" feature gate.
This relies on https://crates.io/crates/hyper-unix-connector, which is similar to hyperlocal
except it also provides the plumbing needed to make this connector.
This approach probably should not be merged - in fact, @LucioFranco's suggestion of a MakeConnection
builder would probably replace the current tls
feature gate as well.
I was just about to open an issue for this. I'm currently using this working branch of
hyperlocal
to implement a customServer
that serves on Unix domain sockets in a personal project. Converting the clientEndpoint
, however, is comparatively less trivial.
there's been a bit of churn on hyperlocal. see
what impact does this have on what you're proposing?
Changes in tonic to allow custom connectors in Endpoint
are still necessary - the changes in hyperlocal would have impact on callers passing in custom connectors, but not directly here.
Hey just to update I'd like to get this in tonic for 0.1
.
As discussed in Discord, it would be useful if Tonic could be used via transports other than TCP sockets - for example a Unix domain socket.