Look this my code:
Code:
RConnection connection;
RSocketServ socketServ;
TConnectionInfoBuf connInfo;
socketServ.Connect();
connection.Open(socketServ);
TUint nConnection;
if(connection.EnumerateConnections(nConnection)!=KErrNone)
{
return false;
}
for(TInt i=1;i<=nConnection;i++)
{
if(connection.GetConnectionInfo(i,connInfo)!=KErrNone)
{
return false;
}
if(connection.Attach(connInfo,RConnection::EAttachTypeNormal)!=KErrNone)
{
return false;
}
//here you can read connection information.
connection.Close();
}