procket icon indicating copy to clipboard operation
procket copied to clipboard

Function to build `struct sockaddr`?

Open qwertystop opened this issue 8 years ago • 1 comments

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.

qwertystop avatar Apr 09 '17 00:04 qwertystop

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!

msantos avatar Apr 10 '17 15:04 msantos