- Nov 3, 2000
- 11,222
- 654
- 126
Hey all, I'm a newb with regards to writing code to do any network programming, and I've run into a problem along the way. Basically, I start a program in "network mode" (it runs as a service) on a linux server, and try to get my Java code to receive messages from the server. After receiving the text from the server, I want to then send commands to the program. I set up a while loop to read lines from the input stream, and after receiving everything, to start writing out to the server. However, I never get out of the while loop that reads from the input stream. The attached code simply tries to read from BufferedReader until there is nothing left to read... I never leave that loop, but it doesn't loop forever; everything just seems to "hang." Any help would be appreciated! Thanks.