-
Notifications
You must be signed in to change notification settings - Fork 25
Document how to use tokio-uds with tokio-proto #5
Comments
Sounds reasonable to me! The |
The documentation for BindServer says "This trait is not intended to be implemented directly". Is this an exception to that rule, or should one of the other traits suggested in that documentation be used? |
@nicholasbishop oh yeah it's not implemented directly, but it can be called with a UnixStream. Most implementations of it (transitively through the impl you see) are generic over |
I think I am still lost :) I was able to make a modified copy of When you say "it's not implemented directly, but it can be called with a UnixStream", does "it" mean the At a higher level, what is the point of the Actually, where are the other four traits mentioned in |
There are a number of main "proto" traits
These are intended to be implemented by protocol authors, and work in the various styles as described by the modules. The The The tl;dr; of
Does that help clear things up? |
This is a bit of a late response, but I just published a crate that makes a |
Thanks @dgriffen! |
Nice! I have my tokio experimentation on the back burner but I'll definitely give it a try when I get back to it. Thanks for putting that crate up. |
Has there been any progress on this issue? I currently have a project that uses a nanomsg as the networking library since I need to switch between TCP and UDS connections for different scenarios. However, I'm looking to move away from that library for several reasons and Tokio in general looks fantastic for my purposes, I just wanted to make sure I can create UDS connections without problems first, and I have yet to find an example of how this works. Any documentation you could point me to? |
The tokio documentation has a simple example of setting up a TCP service with tokio-proto: https://tokio.rs/docs/getting-started/simple-server/#configure-and-run
I'm trying to understand how to do something similar with unix sockets, but it's not clear to me how to connect my implementation of a
Service
with aUnixStream
.The text was updated successfully, but these errors were encountered: