Using mono socket with IPv6 and TCP

I’m trying to use a mono System.Net.Socket to connect to a server using IPv6, but it appear that in the current version of mono, TCP is incompative with this AddressFamily.
Is there a workaround? Might it be because the mono version bundled with Unity is not the latest?

Here’s the simplest way to reproduce this behaviour:

TcpClient c = new TcpClient(AddressFamily.InterNetworkV6);
// SocketException: An address incompatible with the requested protocol was used.

Thanks.

Try using “.Net 2.0 subset” in the api compatibility in the player settings. We had it originally as “.Net 2.0” and we were getting the “incompatible address” error. Changing it to the subset lets you use a hostname properly (as well as resolve them using Dns.GetHostEntry())