MobileChromeApps / cordova-plugin-chrome-apps-sockets-udp

BSD 3-Clause "New" or "Revised" License
80 stars 40 forks source link

"send" is no response in ionic #21

Open wenweixiao opened 7 years ago

wenweixiao commented 7 years ago

In my ionic project, it can't work normally.When I call this method, he didn't give me any return values.

setInterval(function () { var buffer = new ArrayBuffer(12); var x = new Int32Array(buffer); x[1] = 1234; var slice = buffer.slice(4); var y = new Int32Array(slice); console.log(x[1]); console.log(y[0]); x[1] = 6789; alert($scope.socketId); chrome.sockets.udp.send($scope.socketId, buffer, '192.168.0.100', 8888, function(sendInfo) { alert("sent " + sendInfo.bytesSent); }); }, 5000);

wenweixiao commented 7 years ago

This sockets has been created,and I can get the information by the method "chrome.sockets.udp.getInfo".