Hi@all,Help needed. I'm not able to send and receive data between two PC's using UDP.Some one can help where exactly I'm wrong in my code.
I've copied the code snippet of server side and client side.

===============SERVER CODE=====================
EXPORT_C void CEchoEngine::ConstructL(MUINotify* aConsole)
// Construct object, and open a socket
{
// Open channel to Socket Server
User::LeaveIfError(iSocketServ.Connect());
// Open a TCP socket
User::LeaveIfError(iEchoSocket.Open(iSocketServ, KAfInet, KSockDatagram, KProtocolInetUdp));
const TUint32 KInetAddr =
INET_ADDR(10,198,40,159);
//whatever IP u want to set as local IP
iAddress.SetAddress(KInetAddr);
iAddress.SetPort(5068);
iEchoSocket.Bind(iAddress);
}
void CEchoEngine::sendData()
{
const TUint32 KInetAddr2 = INET_ADDR(10,198,40,155);//destination IP
iAddress.SetAddress(KInetAddr2);
iAddress.SetPort(5066);//destination port.

TBuf8<1> aBuffer;
_LIT(kta,"D");
aBuffer.Copy('kta');

iEchoSocket.SendTo(aBuffer,iAddress,0,istatus);

}
===============CLIENT CODE===================
EXPORT_C void CEchoEngine::ConstructL(MUINotify* aConsole)
// Construct object, and open a socket
{
// Open channel to Socket Server
User::LeaveIfError(iSocketServ.Connect());
// Open a TCP socket
User::LeaveIfError(iEchoSocket.Open(iSocketServ, KAfInet, KSockDatagram, KProtocolInetUdp));
const TUint32 KInetAddr =
INET_ADDR(10,198,40,155);
//whatever IP u want to set as local IP
iAddress.SetAddress(KInetAddr);
iAddress.SetPort(5066);
iEchoSocket.Bind(iAddress);
}
void CEchoEngine::sendData()
{
const TUint32 KInetAddr2 = INET_ADDR(10,198,40,159);//destination IP
iAddress.SetAddress(KInetAddr2);
iAddress.SetPort(5068);//destination port.

TBuf8<1> aBuffer;
//iEchoSocket.SendTo(aBuffer,iAddress,KSockWriteUrgent,istatus);
iEchoSocket.RecvFrom(aBuffer,iAddress,0,iStatus);

}
TIA
Ddeveloper