I have a java application which must send strings back to a client. Now this works pretty good but in one function i have to send multiple string sepperatly so i thought i use a flush under every println() but that didn't work to well.
Suppose im trying to send the following, one by one:
I expected that this should send a string to the client one by one but thats not the case.Code:sendToClient.println("order_in:"+orderIn);
sendToClient.flush();
sendToClient.println("order:"+order);
sendToClient.flush();
sendToClient.println("beer_in:"+beerIn);
sendToClient.flush();
sendToClient.println("beer:"+beer);
sendToClient.flush();
sendToClient.println("beer_out:"+bierUit);
sendToClient.flush();
sendToClient.println("period:"+period);
sendToClient.flush();
I only get the first line sepperate from the rest: order_in:5
and the rest comes in as one big message... Anyone any idea why this is happening..??