2012年11月20日

udp群聊

摘要: package cn.charp3;import java.net.DatagramSocket;import java.net.SocketException;public class charDemo { public static void main(String[] args) throws Exception { DatagramSocket send=new DatagramSocket(); DatagramSocket rece=new DatagramSocket(10001); new Thread(new Send(... 阅读全文

posted @ 2012-11-20 15:55 蝌蚪的精神 阅读(215) 评论(0) 推荐(0) 编辑

ud类型聊天

摘要: public static void main(String[] args)throws Exception { System.out.println("发送数据、、、"); DatagramSocket ds=new DatagramSocket(); String str="我来了udp"; BufferedReader bufr=new BufferedReader(new InputStreamReader(System.in)); String line=null; while(... 阅读全文

posted @ 2012-11-20 15:04 蝌蚪的精神 阅读(204) 评论(0) 推荐(0) 编辑

导航