+ 3
Help me I'm stuck
I did a basic server client model, everything works fine. But it just freezes when getting the input. Meaning it never gets the data that is sent from the other side. Server sometimes gets the client data but client never gets the server data. What could be wrong?
2 odpowiedzi
+ 3
Without knowing java or seeing the code and assuming your code is actually correct.
Did you disable Nagle's algorithm?
Maybe with a TCP_NO_DELAY option somewhere.
It's an optimization that causes data to only be send once the buffer is full so if you have it enabled and only send little bits it may never send the data at all.
Try sending alot of data to test that.
Otherwise I have no idea.
https://en.wikipedia.org/wiki/Nagle%27s_algorithm
+ 1
Dennis I think yes, I've added a line that flushes the buffer(or empties it by sending the buffered data) after each input line. So I think something else is wrong