发送端 1. 创建套接字 QUdpSocket mSocket; mSocket = new QUdpSocket(); 2. 发送数据到指定的端口和地址 mSocket->writeDatagram(); 接收端 1. 创建套接字 QUdpSocket mSocket; mSocket = new