diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-11-16 19:08:29 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-11-16 19:08:29 +0800 |
| commit | 434aa8343fdcbb4d5002f934979913c099489bee (patch) | |
| tree | 55bab4ec5a6151be57797d34f61faf5ea744471b /frontend-old/node_modules/faye-websocket/lib/faye/websocket.js | |
| parent | 893c388d4e99442a36005e5971a87730623f946e (diff) | |
sdk, del
Diffstat (limited to 'frontend-old/node_modules/faye-websocket/lib/faye/websocket.js')
| -rw-r--r-- | frontend-old/node_modules/faye-websocket/lib/faye/websocket.js | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/frontend-old/node_modules/faye-websocket/lib/faye/websocket.js b/frontend-old/node_modules/faye-websocket/lib/faye/websocket.js deleted file mode 100644 index 13255eb..0000000 --- a/frontend-old/node_modules/faye-websocket/lib/faye/websocket.js +++ /dev/null @@ -1,47 +0,0 @@ -// API references: -// -// * https://html.spec.whatwg.org/multipage/comms.html#network -// * https://dom.spec.whatwg.org/#interface-eventtarget -// * https://dom.spec.whatwg.org/#interface-event - -'use strict'; - -var util = require('util'), - driver = require('websocket-driver'), - API = require('./websocket/api'); - -var WebSocket = function(request, socket, body, protocols, options) { - options = options || {}; - - this._stream = socket; - this._driver = driver.http(request, { maxLength: options.maxLength, protocols: protocols }); - - var self = this; - if (!this._stream || !this._stream.writable) return; - if (!this._stream.readable) return this._stream.end(); - - var catchup = function() { self._stream.removeListener('data', catchup) }; - this._stream.on('data', catchup); - - API.call(this, options); - - process.nextTick(function() { - self._driver.start(); - self._driver.io.write(body); - }); -}; -util.inherits(WebSocket, API); - -WebSocket.isWebSocket = function(request) { - return driver.isWebSocket(request); -}; - -WebSocket.validateOptions = function(options, validKeys) { - driver.validateOptions(options, validKeys); -}; - -WebSocket.WebSocket = WebSocket; -WebSocket.Client = require('./websocket/client'); -WebSocket.EventSource = require('./eventsource'); - -module.exports = WebSocket; |
