title: Listening to all the data on a certain port
body: <p>My task is to implement an application that will accept all the information that comes to a certain port. It should work like Wireshark.</p>
  
  <p>This code should listen to everything that comes to port 46122.
  In Wireshark,  I see that some information comes to this port. But my program does not see anything.</p>
  
  <pre><code>   ServerSocket serverSocket = new ServerSocket(46122);
     Socket clientSocket = serverSocket.accept();
     PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true);
              BufferedReader in = new BufferedReader(
                                  new InputStreamReader(clientSocket.getInputStream()));
  </code></pre>