![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络
cs_12
这个作者很懒,什么都没留下…
展开
-
java中tcp小例子
服务端:ServerSocket service = new ServerSocket(7777); Socket socket = service.accept(); InputStream input = socket.getInputStream(); OutputStream out = socket.getOutputStream(); BufferedInputSt原创 2015-07-27 00:05:53 · 1545 阅读 · 1 评论 -
java中udp小例子
服务端:DatagramSocket service = new DatagramSocket(9999); byte [] buf1 = new byte[1024]; DatagramPacket receivePacket = new DatagramPacket(buf1,buf1.length); service.receive(receivePacket); Str原创 2015-07-26 23:56:32 · 605 阅读 · 0 评论