I use these codes to make it listen to the local port of 56789. And I make a program on another computer at the same intranet.Trying to connect it at that place but it times out. So the real question is why dealing binding port this way is not proper.Thank you!
try
{
ServerSocket ss=new ServerSocket(56789);
System.out.println("before accpet!");
Socket s=ss.accept();
System.out.println("accpet!");
}
catch(Exception e){
e.printStackTrace();
}