Languages

Menu
Sites
Language
Synchronized Server Socket

Hi all,

I have created a server socket and able to get the request from the TCP/IP client via port forwarding. when i try to send the response in the same socket, it fails.Not able to receive at the client side. below is the code to receive data from the socket after accepting the socket connection.

result r = E_SUCCESS;
unsigned long arg = 0;
ByteBuffer rxBuffer;
char data[5000];
if(null != __pCommunicatorSocket)
{
_pCommunicatorSocket->Ioctl(NET_SOCKET_FIONREAD, arg);
rxBuffer.Construct(arg);
r =_pCommunicatorSocket->Receive(rxBuffer);
}
if (r == E_SUCCESS)
{
// Release resource
rxBuffer.Flip();
rxBuffer.GetArray((byte*)data, 0, arg);
data[arg]='\0';
AppLog(data);
}
r = __pCommunicatorSocket->Send(rxBuffer);
rxBuffer.Clear();
 
Can you help me ?
 
Best regards,
Mohan
Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

1 Replies
muditha murthy
When it fails what is the error you are getting?