Sending empty strings, prints messages on server
This commit is contained in:
parent
58efe7fdd3
commit
5bcc285141
|
@ -70,6 +70,10 @@ void chat(Client client)
|
|||
|
||||
if(msgSend != "exit")
|
||||
{
|
||||
if(strlen(msgSend) < 1)
|
||||
{
|
||||
strcpy_s(msgSend, "ERROR");
|
||||
}
|
||||
client.Send(msgSend);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,9 +40,11 @@ int main()
|
|||
while(1)
|
||||
{
|
||||
client1.Recv(recvBuffer);
|
||||
cout << "Client1: " << recvBuffer << endl;
|
||||
client2.Send(recvBuffer);
|
||||
|
||||
client2.Recv(recvBuffer);
|
||||
cout << "Client2: " << recvBuffer << endl;
|
||||
client1.Send(recvBuffer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue