调试基础库2.18.0
在IOS 14.4.2上存在问题, 报错信息
send socket fail: errono:65, errmsg:No route to host
在模拟器、安卓、IOS10 上暂时没有出现该问题
const socket = wx.createUDPSocket()
socket.bind()
if (socket === null) {
console.error('error!');
return
}
socket.onError(err => {
console.log(err);
})
socket.send({
address: ip,
port: port,
message: info
})
socket.onListening(res => {
// socket.setRecvBufferSize(1024 * 1024 * 1024)
console.log('listening!');
})
socket.onMessage(res => {
setData(new Uint8Array(res.message));
})
遇到相同问题,有解决吗?