I have modified the library to support IPv6 dual mode by changing the socket configuration and by mapping any IPv4 addresses handled to the Connect- and ActuallySendPacket-methods to IPv6 addresses using NetAddress.MapToIPv6(). I have also changed the the default LocalAddress to IPAddress.IPv6Any and have modified the NetUtility.Resolve to also resolve IPv6 addresses.
All unit tests pass and I can connect to a NetServer with LocalAddress = IPAddress.IPv6Any by using an IPv4 address (e.g. 127.0.0.1) as well as an IPv6 address (e.g. ::1).
The biggest "drawback" with this implementation is that internally all addresses are handled as IPv6 addresses. This is especially apparent when it comes to debug output; you will see lines like:
Socket bound to [::ffff:127.0.0.1]:53662: True
I'm new to collaborating via GitHub, but if you are interested in applying the changes I could probably figure out a way to create a pull request :)
Google Code Issue 175: IPv6 support
I have modified the library to support IPv6 dual mode by changing the socket configuration and by mapping any IPv4 addresses handled to the
Connect
- andActuallySendPacket
-methods to IPv6 addresses usingNetAddress.MapToIPv6()
. I have also changed the the defaultLocalAddress
toIPAddress.IPv6Any
and have modified theNetUtility.Resolve
to also resolve IPv6 addresses.All unit tests pass and I can connect to a NetServer with
LocalAddress = IPAddress.IPv6Any
by using an IPv4 address (e.g.127.0.0.1
) as well as an IPv6 address (e.g.::1
).The biggest "drawback" with this implementation is that internally all addresses are handled as IPv6 addresses. This is especially apparent when it comes to debug output; you will see lines like:
I'm new to collaborating via GitHub, but if you are interested in applying the changes I could probably figure out a way to create a pull request :)