Hi,
I am having a problem with UDP sockets. I have a Client app and a server app and both are using UDP sockets for communicating with each other. The Client app is able to send the data (control is coming to RunL()) but the server is just not able to receive any data. I am doing my testing using 2 emulators running on 2 different machines on the LAN. Both emulators have their own IP Address. I have attached the code snippet below of both my client and my server. Pls help me!
Server: running on 10.203.224.249, port: 5061
===================================
iSocket.Open(iSocketServ, KAfInet, KSockDatagram, KProtocolInetUdp);
const TUint32 KInetAddr = INET_ADDR(10,203,224,249);
iLocalAddr.SetAddress(KInetAddr);
iLocalAddr.SetPort(5061);
iLocalAddr.SetFamily(KProtocolInetUdp);
iSocket.Bind(iLocalAddr); //successful till here
//Once bind is successful, i start my reader AO which does the following:
TInetAddr lAddress;
iSocket.RecvFrom(iBuffer, lAddress, 0, iStatus);
SetActive(); //Control never reaches RunL() of this AO
Client: running on 10.203.224.250, port: 5060
===================================
iSocket.Open(iSocketServ, KAfInet, KSockDatagram, KProtocolInetUdp);
const TUint32 KInetAddr = INET_ADDR(10,203,224,250);
iLocalAddr.SetAddress(KInetAddr);
iLocalAddr.SetPort(5060);
iLocalAddr.SetFamily(KProtocolInetUdp);
iSocket.Bind(iLocalAddr); //successful till here
//Once bind is successful, i start my writer AO which does the following:
const TUint32 KInetAddr = INET_ADDR(10,203,224,249);
iRemoteAddress.SetAddress(KInetAddr);
iRemoteAddress.SetPort(5061);
iRemoteAddress.SetFamily(KProtocolInetUdp);
iSocket.SendTo(iWriteBuffer, iRemoteAddress, 0, iStatus);
iTimer->After( iTimeOut );
SetActive();
//Control reaches the RunL() of this AO, which means that data was successfully sent across.
Looks like client sending is successful but data does not reach the server. Is there anything wrong with the code above? I am using active objects for reading and writing as described in the socket example of SDK. I am using version 8.0a.
Kindly help.
Rgds,
Lakshmi

Hi,


