- TCPSocket.connect 链接报错?
[图片]域名是正常解析的,端口也是通的[图片]
2022-08-17 - TCPSocket.connect 连接不上
init() { this.tcp = wx.createTCPSocket() console.log(this.tcp); this.tcp.connect({address: "192.168.4.1", port: 4758}) let wifiInfo = { wifiName: 'cokop_5g', wifiPwd: 'cokop.com' } this.tcp.onConnect(function(res){ console.log('连接成功'); console.log(res); }) this.tcp.onError(function(res){ console.log('发生错误'); console.log(res); }) let data = `cmdkiss:${wifiInfo.wifiName}\\&\\&${wifiInfo.wifiPwd}` this.tcp.write(data) this.tcp.onMessage(function(res){ console.log(res); }) }, 返回的错误信息 errCode: -2, errMsg: "connect socke... errCode: -2 errMsg: "connect socket fail: errno:4 errmsg:Interrupted system call" errNum: 4
2021-07-12 - TCPSocket.connect 链接报错
{errMsg: "connect fail: invalid address xx.com:10104", errCode: -4} 域名是正常解析的,端口也是通的
2021-11-09