Replies: 1 comment
-
One possible explanation is, I think, sockaddr_in6 is longer than sockaddr_in and the socket functions bind() or connect() use the field family at the beginning of the struct to decide which type of address it is, instead of using the argument len ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys, I don't understand why the functions like sockets::connect or sockets::bindOrDie always pass
sizeof struct sockaddr_in6
to the corresponding socket functions. I think InetAddress may capsulate an ipv4 address, and need check if it's ipv4 or ipv6 at runtime ?Beta Was this translation helpful? Give feedback.
All reactions