![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java通信
文章平均质量分 76
吉大第一六爷
66666666666666666666666666666666
展开
-
java--基于UDP的多线程通信
服务端代码:public class UDPServer { public static void main(String[] args) throws Exception{ InetAddress in= InetAddress.getLocalHost(); //1.创建一个DatagramSocket实例 DatagramSocket socket= new D原创 2015-10-19 12:51:33 · 1408 阅读 · 0 评论 -
java--通过socket和多线程进行多个客服端与服务器的简单通讯--基于tcp
线程处理类代码:public class ServerThread extends Thread { Socket socket = null; public ServerThread(Socket socket) { this.socket = socket; } // 重写run方法 public void run() { try{ // 接收来自客服端的数据原创 2015-10-19 09:10:19 · 728 阅读 · 0 评论