I am not sure this is the right forum to ask my question but here goes. I am trying to write this application that calls for a client and a server along with other classes which I have not got to yet. Here is the problem: The client won't accept input. I had it working at one point but had to fix a bug and now it does not accept user input. If someone could just take a look at my code and tell me where my error is I would appreciate it greatly. Here are the client and server classes:
Thank you Oh Lord<br />For the white blind light<br />A city rises from the sea<br />I had a splitting headache<br />from which the future's made<br />--morrisson
If this is the problem I don't understand why you are posting more than just the Client class. You have all sorts of debugging print statements in the code already, so you should be able to give us a better clue as to where the problem is.
Is it possible that you are just missing a "System" in front of the last line here?
Please ignore post, I have no idea what I am talking about.
I posted my server and thread classes so you could see where I was sending the input from the client. out is my printwriter and outputs to the server the user input. The problem is once the client displays a menu it is supposed to accept user inputs such as 1 or 2 or 3 etc and sends that to the server to retrieve a file etc... Instead the cursor just sits there.???
Thank you Oh Lord<br />For the white blind light<br />A city rises from the sea<br />I had a splitting headache<br />from which the future's made<br />--morrisson
Your client is connecting and then reading somethign from the server. Any chance the server is not sending anything? here's a little socket project of my own: http://www.surfscranton.com/architecture/CmdServer.htm I'm new at sockets, and haven't implemented shutdown commands, so it's not perfect. I posted it on my site to solicit any and all constructive comments. The client spawns a separate thread to read responses from the server, allowing the server to send zero to many responses to any request. The client will never get "hung" waiting for something from the server.
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
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
Thank you Oh Lord<br />For the white blind light<br />A city rises from the sea<br />I had a splitting headache<br />from which the future's made<br />--morrisson
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad: