B
bigbinc
I am connecting to a java server through winsock client. I get this
message. Any ideas? Here is my recv code.
totalBytesRcvd = 0;
printf("\nReceived: \n");
int _error_ctr = 0; // I hate quitting, error for so many values
then quit
while (totalBytesRcvd < echoStringLen)
{
if ((bytesRcvd = recv(sock, echoBuffer, RCVBUFSIZE - 1, 0)) <=
0) {
DieWithError("\n(blbxcode): recv() failed or connection
closed prematurely");
_error_ctr++;
if (_error_ctr > 12)
break;
} // end of the if
totalBytesRcvd += bytesRcvd;
echoBuffer[bytesRcvd] = '\0';
printf(echoBuffer);
} // end of the while
printf("\n");
closesocket(sock);
WSACleanup();
message. Any ideas? Here is my recv code.
totalBytesRcvd = 0;
printf("\nReceived: \n");
int _error_ctr = 0; // I hate quitting, error for so many values
then quit
while (totalBytesRcvd < echoStringLen)
{
if ((bytesRcvd = recv(sock, echoBuffer, RCVBUFSIZE - 1, 0)) <=
0) {
DieWithError("\n(blbxcode): recv() failed or connection
closed prematurely");
_error_ctr++;
if (_error_ctr > 12)
break;
} // end of the if
totalBytesRcvd += bytesRcvd;
echoBuffer[bytesRcvd] = '\0';
printf(echoBuffer);
} // end of the while
printf("\n");
closesocket(sock);
WSACleanup();