Hello,
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?
Thanks
Ole
Basically my listener looks like this:
var listener = new TcpListener(IPAddress.Parse("127.0.0.1"), port);
listener.Start();
TcpClient client = listener.AcceptTcpClient();
The client:
var remoteEP = new IPEndPoint(IPAddress.Parse("127.0.0.1"), port);
var client = new TcpClient(AddressFamily.InterNetwork);
client.Connect(remoteEP);
_______________________________________________
Mono-devel-list mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-devel-list