I try to code a client and server connection using socket. The problem is my client can\'t read the response from the server (it hangs on the readline).
Here is some
According to the javaDoc, the server response actually is
"My Message:\n"+System.getProperty("line.separator")
I bet, in.readLine() works fine at least once - but you just ignore the response, because the print command is outside the loop. Move that one up, and you should see the responses on the console.
There is a (very small) chance, that the servers println() doesn't really send a \n char. So you could try this at the thread code:
out.print(clientResponse+"\n\n"); // exchanged println with an extra \n char