Socket中already in use的解决办法

DatagramSocket socket = new DatagramSocket(null);
socket.setReuseAddress(true);
socket.bind(new InetSocketAddress(localAddress, localPort));

posted @ 2014-06-05 15:33  acahesky  阅读(769)  评论(0编辑  收藏  举报