2011/11/1 I=F1aki Baz Castillo <ibc / aliax.net>:
>
> Thanks a lot. But why is it required just for UDP? In TCP I can use "TCPS=
erver.new some_ipv6, port" with no problem. Why UDPSocket requires special =
handling for IPv6?

The protocol (IPv4/IPv6) is determined at socket creation.

The argument of TCPServer.new(ipv6_address) makes Ruby to find that
the protocol is IPv6.
So TCPServer.new creates a socket for IPv6.

But Ruby cannot find the protocol for UDPSocket.new without arguments.
In that case, UDPScoket.new creates a socket for IPv4.
You meet an error when you use it for IPv6.
--=20
Tanaka Akira