UDP 预览不可以发送吗?
发布于 5 年前 作者 rzhu 7016 次浏览 来自 官方Issues
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',
          port9999,
          message"hello world!"
        });
      },2000);
     
   
    
  }
})
1 回复

具体是什么问题?

回到顶部