mirror of
https://github.com/arnaucube/raspberryGPIOhtmlserver.git
synced 2026-02-08 04:06:43 +01:00
servidor funciona, gpio desabilitat
This commit is contained in:
43
node_modules/ws/lib/browser.js
generated
vendored
Executable file
43
node_modules/ws/lib/browser.js
generated
vendored
Executable file
@@ -0,0 +1,43 @@
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
var global = (function() { return this; })();
|
||||
|
||||
/**
|
||||
* WebSocket constructor.
|
||||
*/
|
||||
|
||||
var WebSocket = global.WebSocket || global.MozWebSocket;
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
*/
|
||||
|
||||
module.exports = WebSocket ? ws : null;
|
||||
|
||||
/**
|
||||
* WebSocket constructor.
|
||||
*
|
||||
* The third `opts` options object gets ignored in web browsers, since it's
|
||||
* non-standard, and throws a TypeError if passed to the constructor.
|
||||
* See: https://github.com/einaros/ws/issues/227
|
||||
*
|
||||
* @param {String} uri
|
||||
* @param {Array} protocols (optional)
|
||||
* @param {Object) opts (optional)
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function ws(uri, protocols, opts) {
|
||||
var instance;
|
||||
if (protocols) {
|
||||
instance = new WebSocket(uri, protocols);
|
||||
} else {
|
||||
instance = new WebSocket(uri);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
if (WebSocket) ws.prototype = WebSocket.prototype;
|
||||
Reference in New Issue
Block a user