| Author |
Client to Server Communication for Herbert Schildt
|
Bill Lien
Greenhorn
Joined: Jan 20, 2005
Posts: 1
|
|
Hi Herbert, Thank you for writing The Complete Reference: Java 2 Fifth Edition. I used it in the instruction of my Java Class, and I cannot express my appreciation for how smooth the class went with the easy to follow examples and explanation presented in the book. Will there be a sixth edition convering Java 2 Version 1.5? On a another note, I have been reviewing the Scrabblet practical application that you provided at the end of the book. I have a question on the communication sent between the Client and the Server. How's the following event triggered when the Server sends a message to the client? class ServerConnection implements Runnable { .... public void run() { String s; StringTokenizer st; while ((s = readline()) != null) { st = new StringTokenizer(s); String keyword = st.nextToken(); switch (lookup(keyword)) { default: System.out.println("bogus keyword: " + keyword + "\r"); break; .... case CHALLENGE: { String from = st.nextToken(); scrabblet.challenge(from); } break; } } } } Your response will be much appreciated. Thank you.
|
 |
 |
|
|
subject: Client to Server Communication for Herbert Schildt
|
|
|