?? listen.java
字號:
import java.io.*;import java.net.*;public class Listen extends Thread{ Socket socket; MainWindow mainWindow; public Listen(Socket socket,MainWindow mainWindow) { this.socket=socket; this.mainWindow=mainWindow; } public void run() { try { this.activeListen(this.socket); }catch(IOException ioe){this.mainWindow.panelGo.showError("意外中斷");} } void activeListen(Socket socket) throws IOException { BufferedReader reader=new BufferedReader(new InputStreamReader(socket.getInputStream())); String message; while(true) { message=reader.readLine(); this.mainWindow.doMessage(message); } }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -