Simon Fell > Its just code > WinCE connect problem
More details on my problems with the connect winsock API call on pocketPC's
I've noticed that the winsock connect call never seems to fail, even if there's nothing listening on the remote server/port. The exact same code running on winXP gives a failure during the connect call. I have a small re-pro case. All it does is resolve a host name, construct a sockaddr_in and call connect. on WinXP this fails when there's nothing listening at that address. On both PocketPC 2002 and PocketPC 2003 with ActiveSync 3.8 the connect call will always succeed and later calls to send or recv will fail. With the attached code, it always gets down to the "unable to read data" error. On other tests that send much larger quantities of data before they read anything one of the calls to send will eventually block for ever (i think waiting for some buffer to empty, but it never does).
The PocketPC2003 device is a Toshiba e355 running wince 4.20.1081
The PocketPC2002 device is a compaq iPaq 3650 running wince 3.0.11171
both are connected via the cradle USB connection to a WinXP desktop running activeSync 3.8 I've also re-pro'd it with the iPaq to a WinXP machine running activeSync 3.6