From: Marcin 'Qrczak' Kowalczyk Date: 2002-06-01T05:51:09+09:00 Subject: Sockets, AF_INET6 and getnameinfo problem Hello. This program: require 'socket' TCPserver.open(0).addr doesn't work for me (ruby-1.6.7, Linux 2.4.18): svr.rb:2:in `addr': getnameinfo: ai_family not supported (SocketError) strace shows: socket(PF_INET6, SOCK_STREAM, 6) = 3 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 bind(3, {sin_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0 [...] getsockname(3, {sin_family=AF_INET6, sin6_port=htons(1948), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0 It works if I use two-parameter TCPserver.open with an IPv4 host. I don't really use IPv6 but Ruby should work without disabling IPv6. Is it because of a bug in Ruby? Or just lack of IPv6 support? PS. I'm beginning to try out Ruby in practice and I like it. Nice that it automatically emulates blocking I/O in multithreaded programs. I have a working irc BNC in Ruby, quite simple currently. -- __("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/ \__/ ^^ QRCZAK