Hi,
Im having some problems with a basic winsock server, when my servers running and i open a raw telnet connection to it, i can only send single characters rather than full strings which is what i need.
this is my server code for recived data:
Code:
void Get_Message(int clIndex)
{
int nRet;
char data[1024];
nRet = recv(Client[clIndex].ClientSocket, data, sizeof(data), 0);
char *ClientIp = inet_ntoa(Client[clIndex].ClientAddr.sin_addr);
if (nRet == 0) {
Log("Client disconnected: "), Log(ClientIp), Log("\n");
Disconnect(clIndex);
}
else {
Log("<"), Log(ClientIp), Log("> ");
data[nRet] = '\0';
// Start data output
cout << data;
Log("\n");
}
}
As i say my code works fine, but in a telnet connection i can only send one character at a time rather than a string that i need, the server is simply getting it character by character
Thanks for any help guys
TNT