I was wondering, how exactly does the connection manager work.
Let me describe a scenario.
My application was using GPRS to connect to internet and do its business.
Now the user enables WiFi and is connected to a WiFi network.
so what will happen now.
The connection that my app used was made with GPRS, and now that we have WiFi up, new connections will be made with WIFI and my old connection made using GRPS will also live, am i right or is this not the way connection manager will work
regards

Connection Manager Behaviour !!
PsyCadelik
trun_gup
On Windows Mobile 5.0, the Connection Manager ignores the 'bCache/lCache' parameter when calling ConnMgrReleaseConnection. Dial-up connections remain connected until a different dial-up connection is required.
Windows Mobile 5.0 also adds the AutoBind layered socket provider (LSP). This is a DLL that is loaded into the Windows Sockets stack, which, if you don't explicitly bind to a local interface, automatically binds your socket to the correct address that the Connection Manager indicates that you're using. This socket will then only work for that interface - if the address changes, or you redial, you must create a new socket. Likewise if WiFi arrives or departs. It's almost safest to create a new socket for each request.
Tim Hatcher
these are the values that i am using for the CONNMGR_CONNECTIONINFO structure, as you can see i am not explicitly specifying what type of connection to use, i just want to get connected to the internet.
conn_info.cbSize = sizeof(CONNMGR_CONNECTIONINFO);
conn_info.dwParams = CONNMGR_PARAM_GUIDDESTNET;
conn_info.dwPriority = CONNMGR_PRIORITY_USERINTERACTIVE;
conn_info.bExclusive = FALSE;
conn_info.bDisabled = FALSE;
conn_info.guidDestNet= IID_DestNetInternet;
conn_info.dwFlags = 0;
and i had a grprs connection before the WiFi was established, my application was communicating with the server using this grps, and my question is that later on when wifi is also available and offcourse offers better speed then GRPS, new connections will be made using WiFi, what will happen to the connection that was made with GPRS
thanks
une
Hi,
The excat behaviour depends upon the device you are talking about. The Connection Manager aspect of a Windows Mobile device has a layer called the Connection Planner, which decides how best to establish a connection and under which situation various connections should be disconnected or removed from routing tables etc. These settings tend to be a bit different on devices from different OEMs.
A good introductory blog entry with a couple of references to further documentation is http://blogs.msdn.com/cenet/archive/2006/06/06/620360.aspx. Depending upon the device type you may be able to excert control over the behaviour by making configuration changes.
Many devices for instance will "disconnect" GPRS connections when a desktop pass thru connection is established via ActiveSync. This is due to priorities and exlusive flags for the various connections, such as outlined on the following MSDN page titled "Priority-Based Connection Establishment" (http://msdn2.microsoft.com/en-us/library/ms835273.aspx).
As previous replies have also mentioned the exact bahaviour from an application point of view also depends upon what sort of communication mechanism you are utilising (how your socket is created, what type of socket it is and how long it hangs around for).
Hope it helps,
Christopher Fairbairn
vdv_phuong
When you request a connection you pass a Guid of the network to connect to - if this is the standard internet destination guid then both the GPRS and WiFi connections should provide a route to this network. Therefore if WiFi is actively connected to the internet your app can piggy-back this connection - the device won't establish GPRS if it already has an active connection.
Peter