Hello,

I have problem with RSocket. When I try to bind KInetAddrAny to RSocket, it will leave with error code KErrInUse. I even try to close and open it agian, it will also get KErrInUse.

If somebody else can help us, thank you very much.

TProtocolDesc desc;
User::LeaveIfError(iServer.FindProtocol(aProtocol, desc));

User::LeaveIfError(iListener.Open( iServer
, desc.iAddrFamily
, desc.iSockType
, desc.iProtocol
));

iListenAddr = KInetAddrAny;
TInt err(iListener.Bind(iListenAddr));
if( err == KErrInUse )
{
iListener.CancelAll();
iListener.Close();
RSocketServ Server;
err = Server.Connect();
User::LeaveIfError(err);
User::LeaveIfError(iListener.Open( Server
, desc.iAddrFamily
, desc.iSockType
, desc.iProtocol
));
TInetAddr serverAddr(INET_ADDR(0,0,0,0),80);
err=iListener.Bind(iListenAddr);
User::LeaveIfError(err);
}