java通信
文章平均质量分 76
Winston-Tao
专注游戏服务器开发
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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 · 1479 阅读 · 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 · 787 阅读 · 0 评论
分享