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

Function to build struct sockaddr? #32

Open
qwertystop opened this issue Apr 9, 2017 · 1 comment
Open

Function to build struct sockaddr? #32

qwertystop opened this issue Apr 9, 2017 · 1 comment

Comments

@qwertystop
Copy link
Contributor

That seems like the biggest usability difficulty at the moment: The need to pass a struct sockaddr when there's no way to make one except by manually concatenating bitstrings/binaries.

I could do this myself but it would take a while, because I'm rather busy at the moment. Also I can't make it work cross-platform. Figured I'd put the issue up in case someone else wanted to take it, instead of leaving it to later and forgetting.

@msantos
Copy link
Owner

msantos commented Apr 10, 2017

It's a little tricky since a sockaddr is a pointer to different types of sockaddrs with a common header.

One way to do it would be to create a new sockaddr library:

sockaddr:in(Port, IPv4addr)
sockaddr:in6(Port, FlowInfo, IPv6addr, ScopeId)
....

I will add it to my TODO list!

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