Closed yihuang closed 3 years ago
@yihuang You might also be interested contributing to https://github.com/wusyong/async-zmq It is based on this crate as dependency.
@yihuang You might also be interested contributing to https://github.com/wusyong/async-zmq It is based on this crate as dependency.
That library don't look optimal for me:
I also used this PR of rust-zmq in the example of tokio-async-io.
If you are worried about the correctness of the async example, maybe you can merge the harmless AsRawFd/AsRawSocket
trait impls only, which will enable other people to play with different async libraries.
Of course, the approach to async in this example is ad-hoc, but people can build on top of this concept into something more complete.
Can you separate the AsRawFd
impls and example into separate PRs? I imagine there would be no issue getting the AsRawFd
change merged.
Can you separate the
AsRawFd
impls and example into separate PRs? I imagine there would be no issue getting theAsRawFd
change merged.
Done, removed the example from this PR, add made another one.
thanks! I'm not crazy about the unwraps here, but there's not much we can do if AsRawFd()
doesn't let us return a Result.
Another possibility is to return -1 for the fd. Maybe there is already a precedence for this?
Fix #305