Hi,
In my application I have a separate thread where I wait for network
events (i.e. my implementation of WSAAsyncSelect). I noticed something
strange when I try to connect to unreachable host (e.g. when calling
WSAConnect for 10.1.2.3 address which is unreachable for me) on a
Windows Mobile 6.1 device.
With wifi connection I get WSAEWOULDBLOCK from WSAConnect and later I
get FD_CONNECT event with error 10051 (WSAENETUNREACH) which is what I
would expect.
Now with ActiveSync/USB connection after calling WSAConnect I get
FD_CONNECT with no error code. Then when I try to send data on the
socket it also succeeds and I get FD_WRITE event with no error code.
But after that I get FD_CLOSE event with error 10054 (WSAECONNRESET).
Also there is a difference between PPP and RNDIS. When Activesync is
configured to use PPP ("Advanced network functionality" option is
disabled) WSAConnect returns immediately with WSAEWOULDBLOCK. With
RNDIS WSAConnect blocks for ~20 seconds and returns WSAETIMEDOUT (but
I still get FD_CONNECT event with no error code).
I am interested if this is normal for ActiveSync or maybe ActiveSync
can be configured behave in similar way as wifi ?
Marcin
|