why does the tcpclient.connect always return true on my handheld?

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
At a guess, because you are connected to the 'network' via ActiveSync.
Remember that this simulated network connection may not perfectly match what
you'd expect from a 'real' network connection (because ActiveSync isn't
perfect ;-)

Paul T.
 
Thank you pual.
You are right. I test it with a ethernet card without activesync connecting.
It works great.
 
Back
Top