Hi
When I run the executable, it first receives the data and displays the data itself and the length of data in bytes. But, when I send another package to the server, it does not display anything!
Here is a prt from server code
Code:
char buffer[128];
.....
.....
while(1)
{
if ((newsock=accept( sock,(sockaddr *)&remoteAddr,NULL))==SOCKET_ERROR)
// some error checking
int len;
len=recv(newsock,buffer,sizeof(buffer),0);
// some error checking
cout << "Received data : "<< buffer << ". " << len << " bytes length." << endl;
}
I think, what this code should does is to display the incoming data and return back to begining of while loop.