Just use the example. All you need is to open the socket, then issue an .accept() within the while(true). Maybe sleep it for a couple of seconds. That's all you got to do. Technically you don't even need to accept if you don't plan on doing anything with it:
PHP Code:
public static void main(String[] argv) throws IOException, InterruptedException
{
ServerSocket welcomeSocket = new ServerSocket(43594);
while (true)
{
Thread.sleep(2000);
System.out.println("Nothing to do; take'n a nap.");
}
}
That's it.