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

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

`send()` with callback fails #3

Open lapo-luchini opened 9 years ago

lapo-luchini commented 9 years ago

On Cordova 5.0.0 with example code I get:

chrome.sockets.udp.send(socketId, buf, '127.0.0.1', 22137 /*, function (sendInfo) {
    console.log('sent ' + sendInfo.bytesSent);
}*/ );

I/chromium( 4850): [INFO:CONSOLE(307)] "Error in Error callbackId: ChromeSocketsUdp1732631474 : TypeError: Cannot read property 'message' of undefined", source: file:///android_asset/www/cordova.js (307)

It works ok if I comment out the callback.