An IPv4 or an IPv6 address, with its port.
More...
#include <socket.h>
|
|
union { | |
|
struct sockaddr any | |
| | What the socket API takes.
|
|
struct sockaddr_in v4 | |
| | When any.sa_family is AF_INET.
|
|
struct sockaddr_in6 v6 | |
| | When any.sa_family is AF_INET6.
|
| }; | |
|
socklen_t | len |
| | The size of the address in use.
|
An IPv4 or an IPv6 address, with its port.
- Note
- any.sa_family says which one. Before the socket API writes one (accept, recvfrom, getsockname), len is the room there is: the size of the biggest, sizeof(v6)
The documentation for this struct was generated from the following file: