I\'m writing a small client application to communicate with a server. I open a socket between my client and the server and can read anything that goes out from the server wi
At this point, there is no convincing evidence that your client code is not working. In particular, this statement:
System.out.println(socketWritter.toString());
won't tell you anything useful. The toString() method only on a Stream object most likely only tells you the object's class name and its identity hashcode. It certainly won't tell you what you've written to the stream.
Given that, there is no clear evidence that the flush
hasn't worked. (The problem could be on the server side.)