【练习】SOCKET
摘要:
例1:建立发送端A和接收端B,B的监听端口为1111,A通过UDP协议发送消息到B,B打印A发送的消息。接收端:public class UdpReceiver { public static void main(String[] args) throws IOException { DatagramSocket ds = new DatagramSocket(1111); byte[] buf = new byte[1024]; DatagramPacket dp = new DatagramPacket(buf, buf.length); ... 阅读全文
posted @ 2013-09-12 16:16 啷哩个啷 阅读(180) 评论(0) 推荐(0)
浙公网安备 33010602011771号