as3.0 UDP

import flash.utils.ByteArray;
import flash.net.DatagramSocket;
var udpSocket:DatagramSocket  = new DatagramSocket();
var bytes:ByteArray = new ByteArray();
bytes.writeUTFBytes("test");
udpSocket.send(bytes, 0, 0, "127.0.0.1", 8888);

 

posted on 2021-04-08 14:17  zqiang0803  阅读(213)  评论(0编辑  收藏  举报

导航