Stable ConnectionManager managed wrapper

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone know of a stable managed ConnectionManager wrapper for the Pocket
PC?

I have been trying to use the OpenNETCF ConnectionManager wrapper with
little success.

It seems not to connect when running under a worker thread (business layer)
once a Connect message is sent, the Status property gets set to
ConnectionDisabled. But looking at the source, the disabled flag is being set
to false!?! What is also strange, if I issue the Connect message multiple
times in this layer, it sometimes works.

It gets stranger...if I try and send the Connect message under the UI layer,
it works 99.9% of the time.

I don't have the time to roll my own, is there another third party library
available? It is a shame this functionality is not in CF2.0.

Regards
Simon.
 
I found this code seems to work in all the cases I have tested it in:

for (int i = 0; i < 10; i++)
{
//Initiate a connection to the APN - which is by default
Orange World - "orangeinternet".
connectionManager.Connect(network, false,
OpenNETCF.Net.ConnectionMode.Asynchronous);
if (connectionManager.Status ==
ConnectionStatus.WaitingConnection | connectionManager.Status ==
ConnectionStatus.Connected)
break;
}

Simon.
 
Back
Top