i have two projects: one is a client and one is a server.
lets say the server as to send 2 messages one after the other to the client.
the client code is like this:
while(1)
{
recv(acceptedStr, socket);
printf("%s
, acceptedStr);
*other code lines*
}
while the server code is like this:
while(1)
{
send(socket, "First String");
send(socket, "Second String");
*other code lines*
}
if there is no TIME_OUT for the second send, will the recv of the client get "Second String"? or does he have to make sure that he is in a recv before the server send?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…