G
Guest
hi, all
I have a piece of code like this:
bool bRet = true;
try
{
System.Net.Sockets.TcpClient client = new TcpClient();
client.Connect(new System.Net.IPEndPoint(IPAddress.Parse(strIP),8000));
client.Close();
}
catch(Exception ex)
{
bRet = false;
}
I tested this code on my hp 5150, whatever the strIP is, except empty, the
connect() always return very quickly and looks like it connected
successfully. But this is not ture. Does anyone know what is wrong here?
Thanks
I have a piece of code like this:
bool bRet = true;
try
{
System.Net.Sockets.TcpClient client = new TcpClient();
client.Connect(new System.Net.IPEndPoint(IPAddress.Parse(strIP),8000));
client.Close();
}
catch(Exception ex)
{
bRet = false;
}
I tested this code on my hp 5150, whatever the strIP is, except empty, the
connect() always return very quickly and looks like it connected
successfully. But this is not ture. Does anyone know what is wrong here?
Thanks