GPRS connection and threads
| Thu, 2005-08-25 13:08 | |
|
Target: store an used IAP to the config file and reuse the same connection next time without user interaction.
Common question but with a trick. IAP storing part is implemented like (pseudocode): sockserv.Connect(); connection.Open(sockserv); connection.EnumerateConnections(); connection.GetConnectionInfo( 1, inf ); store( inf()iIapId ); I end up with some number in conf file. Next time I want to avoid user interaction, I do: TCommDbConnPref connectPref; connectPref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt); connectPref.SetDirection(ECommDbConnectionDirectionOutgoing); connectPref.SetIapId( setup.GetInt(SETUPKEY_UI_IAP) ); connection.Start( connectPref ); But, the tricky part - the socket creation/connection takes place in another thread. And this thread asks for an IAP again ignoring the fact that there is a GPRS connection up and active already. Do you have any solutions? Ahti. |
|






Forum posts: 83
Forum posts: 47
impossible. And not logical. If the TCP/IP connection is up - why RSocket does not use the one?
Ahti.
Forum posts: 83
You can send pointer to thread and you can use this pointer inside you thread.