Basically there is no API to get the connection status of your socket. A work around (usually developers use) is by the use of a AO status enum in your class (don't confuse it with the iStatus).
Code:
enum TAOState   {   EConnected,   EDisconnected   // add your additional states if any   };
TAOState iAOState;
Now when ever a connection occured the RunL will hit then make your iAOState =Â EConnected and same way if encountered a socket disconnection set iAOState = EDisconnected.
now you may create a function like this:
Code:
TBool CYourAO::IsConnected() Â Â { Â Â return (iState == EConnected )? ETrue: EFalse; Â Â }
We do not use AO framework for our sockets - the application being a huge one and there are good number of sockets used. And asynchronous operations of sockets is not desired. Outside of AO, is there no solution?
In the UIQ3SDK one finds in the description of RConnection, that RConnection can be used to get
Quote
The current status of the connection and subconnections with respect to data transfer, i.e. active/inactive
But there is no document that says how that is done!
I guess there is a combination of arguments for SetOpt on RConnection that could be used, that should be followed by a call to GetConnectionInfo();
Check the RConnection::ServiceChangeNotification() API with the SDK Help. If you're working on Symbian OS 9.x then the RConnectionMonitor class also may be helpful for you.
Forum posts: 732
- How can I create an Internet connection without prompting a dialog?
- How can I determine active connections?
Forum posts: 19
I am looking at implementing a function like
RConnection::enumerateConnections() only retrieves the number of active connections.
Thanks,
Tanuja
Forum posts: 732
  {
  EConnected,
  EDisconnected
  // add your additional states if any
  };
TAOState iAOState;
Now when ever a connection occured the RunL will hit then make your iAOState =Â EConnected and same way if encountered a socket disconnection set iAOState = EDisconnected.
now you may create a function like this:
  {
  return (iState == EConnected )? ETrue: EFalse;
  }
Forum posts: 19
In the UIQ3SDK one finds in the description of RConnection, that RConnection can be used to get
But there is no document that says how that is done!
I guess there is a combination of arguments for SetOpt on RConnection that could be used, that should be followed by a call to GetConnectionInfo();
I am not able to pin down the exact parameters!
Thanks,
Tanuja
Forum posts: 732