First page Back Continue Last page Overview Graphics
Result of getaddrinfo() (1)
Return value
- 0 if succeeded
- Dynamically allocated result returned via res
- freeaddrinfo(): free result
- Otherwise getaddrinfo-specific error code
- EAI_FAMILY, EAI_NONAME, EAI_SERVICE etc.
- gai_strerror(): human readable string for error code
- Result comes with information required to create socket and to connect (or to bind)
- Address family, socket type, protocol, and length of the socket address structure
- Yield differences among address families / protocols
Notes: