datacommsserver/esockserver/test/TE_EsockTestSteps/src/EsockTestBase.cpp
branchRCL_3
changeset 18 9644881fedd0
parent 17 9ddb1d67ebaf
child 21 07656293a99c
equal deleted inserted replaced
17:9ddb1d67ebaf 18:9644881fedd0
   833     if (aParams.iConnectionName.Length()>0)
   833     if (aParams.iConnectionName.Length()>0)
   834     	{
   834     	{
   835 		RConnection* c = iConns.Find(aParams.iConnectionName);
   835 		RConnection* c = iConns.Find(aParams.iConnectionName);
   836 		if (c==NULL)
   836 		if (c==NULL)
   837 			return KErrNotFound;
   837 			return KErrNotFound;
   838 		error = s->Open(*ss, KAfInet, aParams.iSocketType, aParams.iProtocol, *c);
   838 		error = s->Open(*ss, aParams.iAddrFamily, aParams.iSocketType, aParams.iProtocol, *c);
   839 		}
   839 		}
   840 	else if (aParams.iSubconnectionName.Length()>0)
   840 	else if (aParams.iSubconnectionName.Length()>0)
   841     	{
   841     	{
   842 		RSubConnection* sc = iSubConns.Find(aParams.iSubconnectionName);
   842 		RSubConnection* sc = iSubConns.Find(aParams.iSubconnectionName);
   843 		if (sc==NULL)
   843 		if (sc==NULL)
   844 			{
   844 			{
   845 			return KErrNotFound;
   845 			return KErrNotFound;
   846 			}
   846 			}
   847 		error = s->Open(*ss, KAfInet, aParams.iSocketType, aParams.iProtocol, *sc);
   847 		error = s->Open(*ss, aParams.iAddrFamily, aParams.iSocketType, aParams.iProtocol, *sc);
   848 		}
   848 		}
   849 	else if (aParams.iProtocolName.Length()>0)
   849 	else if (aParams.iProtocolName.Length()>0)
   850 		{
   850 		{
   851 		error = s->Open(*ss,aParams.iProtocolName);
   851 		error = s->Open(*ss,aParams.iProtocolName);
   852 		}
   852 		}
   853 	else
   853 	else
   854 		{
   854 		{
   855 		error = s->Open(*ss, KAfInet, aParams.iSocketType, aParams.iProtocol);
   855 		error = s->Open(*ss, aParams.iAddrFamily, aParams.iSocketType, aParams.iProtocol);
   856 		}
   856 		}
   857 
   857 
   858 
   858 
   859 	return error;
   859 	return error;
   860 	}
   860 	}
   861 
   861 
   862 TInt CCEsockTestBase::BindSocket(const TRSocketParams& /*aParams*/)
   862 TInt CCEsockTestBase::BindSocket(TRSocketParams& aSockeSParams)
   863 	{
   863 	{
   864     return KErrNotSupported;
       
   865     /*
       
   866     RSocket* s = iSocks.Find(aSockeSParams.iSocketName);
   864     RSocket* s = iSocks.Find(aSockeSParams.iSocketName);
   867 	if (s==NULL)
   865 	if (s==NULL)
   868 		return KErrNotFound;
   866 		return KErrNotFound;
   869 
   867 
   870 	TInt error = KErrNone;
   868 	TInt error = KErrNone;
   872 	    error = s->SetOpt(KSoUdpSynchronousSend,KSolInetUdp,1);
   870 	    error = s->SetOpt(KSoUdpSynchronousSend,KSolInetUdp,1);
   873 	if (error!=KErrNone)
   871 	if (error!=KErrNone)
   874 		return error;
   872 		return error;
   875 
   873 
   876 	//bind to Local address for TCP or UDP
   874 	//bind to Local address for TCP or UDP
       
   875 	
   877 	return s->Bind(aSockeSParams.iLocalIP);
   876 	return s->Bind(aSockeSParams.iLocalIP);
   878 	*/
       
   879 	}
   877 	}
   880 
   878 
   881 TInt CCEsockTestBase::ConnectSocket(TRSocketParams& aParams, TRequestStatus& aRequestStatus)
   879 TInt CCEsockTestBase::ConnectSocket(TRSocketParams& aParams, TRequestStatus& aRequestStatus)
   882 	{
   880 	{
   883     RSocket* s = iSocks.Find(aParams.iSocketName);
   881     RSocket* s = iSocks.Find(aParams.iSocketName);