I have a client-server application where the server sends all clients a list of all clients every time a new client socket joins. The problem is, that when a new client joins it gets the right list but the old clients get the old list they got when joining themselves. Sort of like they take the same object from the input stream every time.
Can I somehow flush the input stream?
Reading the object:
while((inObject = in.readObject()) != null) {
...
}
Sending the object:
out.writeObject(object);