[Mono-list] Socket programming ....

esqueleto@tusofona.com esqueleto@tusofona.com
Mon, 10 Jan 2005 22:08:20 -0000 (WET)


Hello

I'm trying to develop an application that use Sockets with Mono. Fist i'm
trying to develop a client that try to connect to a NewsGroup Server (this
is a client example).

This is the code to connect:

try
{
	System.Net.IPAddress _ip = IPAddress.Parse ("130.133.1.4");
	IPHostEntry _hostEntry=Dns.GetHostByAddress(_ip);

	_tcpListener = new System.Net.Sockets.TcpListener (_ip, 119);

	Console.Out.WriteLine (":: Starting Listener ....");
	_tcpListener.Start();
	Console.Out.WriteLine (":: Listener Started");
}
catch (System.Exception _ex)
{
	Console.Out.WriteLine (string.Format("ERROR: {0}", _ex.Message));
}


This is the output i get:

:: Starting Listener ....

** (<unknown>:24774): WARNING **: : Need to translate 99 [Cannot assign
requested address] into winsock error
ERROR: System call failed


Can any one help me resolve this error ???


tkx in advance
Paulo Aboim Pinto
Odivelas - Portugal