⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listen.java

📁 使用Java编写的网络围棋游戏程序.非常简明
💻 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 + -