const app = getApp()
Page({
startDiscovery:function()
{
console.log('startDiscovery')
var that = this;
that.udpSocket = wx.createUDPSocket();
that.udpSocket.bind(3333);
setInterval(function(){
that.udpSocket.send({
address: '192.168.2.106',
port: 9999,
message: "hello world!"
});
},2000);
}
})
具体是什么问题?
const udp = wx.createUDPSocket()
udp.bind(3333)
setInterval(function(){
udp.send({
address: '224.0.0.251',
port: 9999,
message: "hello world!"
});
},1000);
修改了地址任然不可以