From: Dave Thomas Date: 2000-05-25T02:05:44-05:00 Subject: [ruby-talk:02976] Re: Socket.getnameinfo ts writes: > >>>>> "D" == Dave Thomas writes: > > D> OK - now I'm confused even more. Is this implying I need to pass a > D> port number in as a string? I tried that, but got > > No, ruby always call getaddrinfo with hints->ai_socktype == 0 > see ext/socket/socket.c > > MEMZERO(&hints, struct addrinfo, 1); > if (strcmp(STR2CSTR(af), "AF_INET") == 0) { > hints.ai_family = PF_INET; > } > #ifdef INET6 > else if (strcmp(STR2CSTR(af), "AF_INET6") == 0) { > hints.ai_family = PF_INET6; > } > #endif > else { > hints.ai_family = PF_UNSPEC; > } > error = getaddrinfo(hptr, pptr, &hints, &res); So when I document the call, I should say that the only value allowed for the service parameter is nil?