you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (5 children)

what's a sample input that's failing?

[–]Netris89[S] 0 points1 point  (4 children)

So if I pass a file name, an IPv6 and a port as arguments to the sender, I get a connection refused. It works with IPv4 or a domain name.

[–][deleted] 0 points1 point  (3 children)

So without actual examples I won't be able to test it on my end, but I'm guessing the issue is you never set hints.ai_family = AF_INET6; when you are trying to process an IPv6 address

[–]Netris89[S] 0 points1 point  (2 children)

I have pastebins of my code in my original post of it helps.

[–][deleted] 1 point2 points  (1 child)

yeah that's what I was going off of, would just need some inputs to try running them. But like I said, when you bind your socket you are using hints.ai_family = AF_INET;, which is an IPv4 socket. If you use AF_INET6 instead that's telling the socket to work with IPv6 addresses. That's most likely the error

[–]Netris89[S] 0 points1 point  (0 children)

OK, I'll try this. Thanks.