title: serversocket is not accepting connection?
body: <p>I am using a Mac and trying to run a server on my <strong>local machine</strong> . Here is the code</p>
  
  <pre><code>//1. creating a server socket
          providerSocket = new ServerSocket(0, 10);
          //2. Wait for connection
          System.out.println("Waiting for connection");
          try{
          connection = providerSocket.accept();
          }
          catch (IOException ex){
              System.err.println(ex);
          }
          System.out.println("Connection received from " +                   connection.getInetAddress().getHostName());
  </code></pre>
  
  <p>I am seeing th print "Waiting for Connection" but not the print for  "Connection received from ..."
  I see that code is still running, that means the accept() is blocked ? How can I fix this ?</p>