DatagramSocket的connect方法。

Notice that connect just filters the packets sent and received; that is, it does not establish a real connection with the remote host, so the method itself does not send anything and never fails, unlike TCP

 

 

我承认我低端,调用connect不可能返回false;

 

上面是引用的:http://www.techrepublic.com/article/using-datagrams-in-java/5099670

你可能感兴趣的:(java)