mkuklis/phonegap-websocket — pull request #23 by dhuyvett (2013-11-06 23:32:56+00:00)
Title: Use native WebSockets on KitKat

Added check to see whether WebSockets are available. Also added global boolean usingCordovaWebSocket. Unfortunately, native WebSockets on KitKat do not tolerate the options object in the constructor. Client code that uses the options object will have to do something like:

if (usingCordovaWebSocket) {

socket = new WebSocket("ws://10.0.2.2:9003", "", { draft : "draft17" });

} else {

socket = new WebSocket("ws://10.0.2.2:9003");
}