title: Make Java IO Socket listen just like a ServerSocket
body: <p>I'm doing a financial messaging integration as follows:</p>
  
  <ol>
  <li>A server has an interface listening for requests from a client socket on a specific IP and port</li>
  <li>Server sends a response for every request, back to the client socket</li>
  <li>Also, server sends requests to the same client socket</li>
  </ol>
  
  <p>The following is working perfectly:</p>
  
  <ol>
  <li>The client socket (Socket object of Java IO) successfully sends requests to the server interface</li>
  <li>The client socket successfully receives response for every request</li>
  </ol>
  
  <pre><code>try {
      Socket clientSocket = new Socket("example.com", 8888);    
      BufferedWriter output = new BufferedWriter(new OutputStreamWriter(clientSocket.getOutputStream()));
      output.write(data);
      output.flush();
      BufferedReader input = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
      // Read responses or new request from input
  } catch (IOException e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p>The client socket is supposed to receive any request from the server - the same way it's receiving responses from the same sever. However, when a server initiates a request to the client socket, the request is never received. However, we can trace the traffic from the tcpdump on the client environment.</p>
  
  <p>How can I make the client socket listen to requests from the server, and not just responses?</p>
  
  <p><strong>Update</strong></p>
  
  <p>It might help to clarify something on this integration:</p>
  
  <p>a. The 'server' in this case is a third party system, with it's integration rules</p>
  
  <p>b. My client socket posts message to the server (above)</p>
  
  <p>c. My implementation listens to responses and requests from the third <strong>party system server</strong>, either by creating my own <strong>server socket</strong> (ruled out), or using the very <strong>client socket</strong> I'm sending with (the solution I was seeking) </p>