Hi, folks. Here is the partial spec of my first networking programming assignment. GET: This message is sent from the client to the server, and contains the ASCII string GET followed by the newline character \n. On sending the GET message, the client waits for a return message from the server via the socket that connects them. eg. Client: GET Server: GET: OK A dog says woof however, what i've got from the command line is like this: Server: GET: OK you see, the rest of the message(after the newline character) is missing. Could someone plz point me out what i did wrong. Thanx in advance. below is the complete four classes i've come up so far and the text file(animalSoundData.txt) the server reads. it's all complied. please copy it to your own HDD and run it so you would know exactly what the problem is. thanx again! P.S. i am sorry about the long post. please bear with me as i am desperately looking for the solution. the server class
the client class
the protocol class
the helper class
the content of text(animalSoundData.txt)file: dog:woof cat:miao cow:moo snake:hiss bird:chirp [ April 12, 2004: Message edited by: ambrositti li ]
In the client, double check what's inside the loop "while((userInput = stdIn.readLine()) != null)" and what should maybe be outside the loop. That's a broad hint at one thing that may not actually be the problem. Lemme know if it helped!
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi