SocketTimeoutException: Accept timed out
<p>The following bit of code throws java.net.SocketTimeoutException: Accept timed out. </p>

<p>ServerSocket serverSocket = new ServerSocket(0, 1, InetAddress.getLocalHost());
serverSocket.setSoTimeout(6000);<br>
serverSocket.accept();</p>

<p>I have tried changing everything i can in creating a serversocket but the error remains the same. Please guide me in what I' missing here, if any. </p>
