my dog learned polymorphism
The moose likes Sockets and Internet Protocols and the fly likes BufferedReader and Socket trouble Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "BufferedReader and Socket trouble" Watch "BufferedReader and Socket trouble" New topic

BufferedReader and Socket trouble

David Vallejo

Joined: Feb 12, 2013
Posts: 1
I've been trying to fix this code for some time now and it still doesn't work. I want to the client to send some text to the server, and for the server to respond with hardcoded text from an array. I can get the server to receive and display text from the client, but not vice versa. My command prompt freezes up as well after you write two lines to the server, which may be because of the text from the array being sent from the server. Sorry if the code is a bit sloppy.

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42958
Could this be the problem? Don't println to a Socket
I agree. Here's the link:
subject: BufferedReader and Socket trouble
It's not a secret anymore!