Hello,
I've ran into the following problem - using a TcpClient from a craddled
PocketPC lets you connect to any address without throwing an exception, even
if the address does not exist. This happens only if the device is craddled
and synchronized with ActiveSync 4.
From a craddled PocketPC 2003 SE, CF 2.0, both real device and emulator, the
following code:
Dim client As New TcpClient
client.Connect("192.168.2.21", 9876)
works for any address without throwing an exception for wrong addresses.
Adding the lines (to verify if a connection has actually been created):
Dim stream As Stream = client.GetStream()
stream.WriteByte(0)
stream.Flush()
solves the problem (meaning I get a transport exception), but only when
stepping through the code in the debugger. Running the code directly again
results in no exception.
Is there any way to check more thoroughly if the connection actually exists?
Thank you.
"Peter Huang" [MSFT] - 06 Jan 2006 02:05 GMT
Hi Euphilos,
This newsgroup is for desktop framework development issue.
As for compact framework issue, please post in the newsgroup below.
microsoft.public.dotnet.framework.compactframework
or
microsoft.public.pocketpc.developer
Thanks for your understanding!
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.