I have 2 programs. 1 server and 1 client.
In the client it goes something like this:
while(statement)
{
networkstream.write(data);
}
And in the server it goes something like this:
while(statement)
{
while(statement)
{
ReceiveData;
}
Do other stuff;
}
So, while the client can write to the network stream really fast, the server still has to attend to the data before he can read some more.
What happens when the client has already made 4 laps of the loop containing the write, while the server has still only read 1 time for example.
Is there a way of letting the client know when he can make another write? And also what happens when the client make several '.write'? does the server keep them all and reads them all or does the data that has been sent get overwriten?
Hopefully you can understand my question. Edit the question title if you desire.