[Mono-dev] Can't create a local tcp connection on mono
ob at dansound.dk
Sat Mar 2 14:56:57 UTC 2013
The code below works on Windows. However, when running on mono 2.10.5 on
Gentoo Linux, the listener throws the exception:
System.Net.Sockets.SocketException: The requested address is not valid
in this context
Listening on the address IPAddress.Any instead of the loopback address
makes the listener run without exception. However, when the client is
started, no connection is created (the server eventually times out).
Can anybody explain why I can't create a local connection on mono?
Basically my listener looks like this:
var listener = new TcpListener(IPAddress.Parse("127.0.0.1"), port);
TcpClient client = listener.AcceptTcpClient();
var remoteEP = new IPEndPoint(IPAddress.Parse("127.0.0.1"), port);
var client = new TcpClient(AddressFamily.InterNetwork);
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list