?? listenerthread.java
字號:
package bingo.shared;import java.net.*;import java.io.*;public abstract class ListenerThread extends Thread { boolean stopListening = false; MulticastSocket socket; private InetAddress group; private String groupString; public ListenerThread(String groupString) throws UnknownHostException, IOException { super(); this.groupString = groupString; this.group = InetAddress.getByName(groupString); socket = new MulticastSocket(Constants.portNumber); socket.joinGroup(group); } public void stopListening() throws IOException{ stopListening = true; socket.leaveGroup(group); socket.close(); }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -