out.write("From server: " + nextResponse);The client reads using:
while ((fromServer = in.readLine()) != null) {However, the PrintWriter write method doesn’t put a carriage return at the end of the data. Hence, no matter how much data the server sends, the client will never receive any of it.