1

I can't understand usage for hints parameter in getaddrinfo()

getaddrinfo(node, service, &hints, &res);

Same sample code for getadderinfo() like below doesn't read hints as if hints’ll never be set value.

http://manpages.ubuntu.com/manpages/hardy/man3/getaddrinfo.3.html

http://www.freebsd.org/cgi/man.cgi?query=getaddrinfo&sektion=3

Then what is hints for ?

Do I have to check the value of the hints when getaddrinfo returns?

fejese
  • 4,601
  • 4
  • 29
  • 36
user1345414
  • 3,745
  • 9
  • 36
  • 56
  • 2
    What part of "The hints parameter specifies the preferred socket type, or protocol" don't you understand? – user207421 Feb 20 '14 at 09:42
  • Now I understand. I must have read carefully. The hitnts is kind of switch to change behavior of `getaddrinfo()`, not the parameter for accepting returned value. – user1345414 Feb 21 '14 at 00:25

0 Answers0