Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for passing Path to Socket bind & connect methods #44

Closed
yoshuawuyts opened this issue Sep 22, 2019 · 2 comments
Closed

Support for passing Path to Socket bind & connect methods #44

yoshuawuyts opened this issue Sep 22, 2019 · 2 comments

Comments

@yoshuawuyts
Copy link
Member

In alexcrichton/mio-uds all socket types are constructed from references to Path. This is to match the API of std's unix socket types.

It'd be great if socket2 would expose extra methods to bind and connect on Path types when the unix feature is enabled. This would save some unsafe code and boilerplate for consumers implementing unix socket types.

Thanks heaps!

@sfackler
Copy link
Member

You can construct a SockAddr from a Path: https://docs.rs/socket2/0.3.11/socket2/struct.SockAddr.html#method.unix

@yoshuawuyts
Copy link
Member Author

Oh! Yeah that's pretty much all I need!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants