@herdwatch/cordova-plugin-chrome-apps-sockets-udp
v1.3.2-fix.3
Published
This plugin provides UDP sockets for Android and iOS.
Readme
chrome.sockets.tcp Plugin
Why this fork exists
Forked from upstream because we needed reliable error reporting: several native Android error paths only logged and returned without ever calling back into JS, and iOS needed a workaround to trigger the local-network permission prompt before opening a UDP socket.
Published as @herdwatch/cordova-plugin-chrome-apps-sockets-udp.
Changes from upstream:
- Split every JS API call (
create,bind,send,setBroadcast,joinGroup, etc.) into separatesuccessCallback/errorCallbackparameters instead of one overloaded callback - Android: socket-not-found and other error paths now call
callbackContext.error(...)with a named error code instead of only logging and leaving the JS callback unresolved - Android: receive-error events now carry the
socketIdso callers with multiple open sockets know which one failed - Android: a socket made before the app was bound to a network (
bindProcessToNetwork) is bound to that network before it sends, so it no longer fails with "Network is unreachable" once the first one is gone - iOS:
createnow calls[NSProcessInfo hostName]to trigger the local network permission prompt before opening the socket
This plugin provides UDP sockets for Android and iOS.
Status
Beta on Android and iOS.
Reference
The API reference is here.
Release Notes
1.3.0 (Sep 27, 2016)
- Adds
chrome.udp.setBroadcast()
1.2.2 (April 30, 2015)
- Renamed plugin to pubilsh to NPM
1.2.1 (Mar 17, 2015)
- Fix multicast socket cannot pause & send receive event synchronously
1.2.0 (November 17, 2014)
- Remove unnecessary headers for chrome.sockets.* - ios
- Fix possible blocks leak memory
- Fixed chrome.sockets.udp socket close with error problem
- Commented out assert that caused app to crash when no network is available.
- chrome.sockets: open selector in selector thread
- Don't modify interest set when key is invalid (fix #388)
1.1.0 (October 24, 2014)
- Add
chrome.sockets.secure.tcpand refactorchrome.sockets.*
1.0.1 (October 23, 2014)
- Fix a NullPointerException on Android
- Fix the dependency on iosSocketsCommon so that it works with the Cordova plugin registry.
1.0.0 (October 21, 2014)
- Initial release
