Hello, I'm new at this, so please be easy on me I'm trying to get a client to wait for a server's response by using the following structure in the thread's run() (using Runnable).
But this gives me an exception after the first loop because it is continously doing the while loop and trying to read something from server. And if I use 'if' instead of 'while', it only goes through it once, and doesn't listen for anymore server messages. Is there anyone who can steer me in the right direction on this? Thanks.
posted 14 years ago
Welcome to the Ranch aza. I have written a code to show that I do not have an exception because of the fact the thread is looping forever calling readObject:
You may find interesting One way messages by Dough Lea [ November 17, 2002: Message edited by: Jose Botella ]