id
int64
0
1.29M
original_id
stringlengths
32
32
swhid
stringlengths
100
170
sha1
stringlengths
40
40
repo_name
stringlengths
2
45
repo_group
stringclasses
12 values
filepath
stringlengths
5
153
name
stringlengths
1
14.9k
type
stringclasses
3 values
code
stringlengths
7
2.12M
1,288,500
2cc4859fdf423b123ba82b7e0f004bb0
swh:1:cnt:a6fbe72b7b12370f056e2dc8e8ccd93bf7fce24e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=139-141/
7921674b0b03c74e28c26fdd1b65c6d49c1b8769
wlbdashboard
wmcs
node_modules/ws/lib/event-target.js
addEventListener::onError
function
function onError(error) { listener.call(this, new ErrorEvent(error, this)); }
1,288,501
7c364e2b0048c5b0a867584b930dcf6a
swh:1:cnt:a6fbe72b7b12370f056e2dc8e8ccd93bf7fce24e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=143-145/
7921674b0b03c74e28c26fdd1b65c6d49c1b8769
wlbdashboard
wmcs
node_modules/ws/lib/event-target.js
addEventListener::onOpen
function
function onOpen() { listener.call(this, new OpenEvent(this)); }
1,288,502
8467d76d7e02b53b95e1845d6a5b6e24
swh:1:cnt:a6fbe72b7b12370f056e2dc8e8ccd93bf7fce24e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=166-181/
7921674b0b03c74e28c26fdd1b65c6d49c1b8769
wlbdashboard
wmcs
node_modules/ws/lib/event-target.js
removeEventListener
function
/** * Remove an event listener. * * @param {String} type A string representing the event type to remove * @param {Function} listener The listener to remove * @public */ removeEventListener(type, listener) { const listeners = this.listeners(type); for (let i = 0; i < listeners.length; i++) {...
1,288,503
bfbbf7d3da914d7273aff63c4baed985
swh:1:cnt:a6fbe72b7b12370f056e2dc8e8ccd93bf7fce24e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=116-164/
7921674b0b03c74e28c26fdd1b65c6d49c1b8769
wlbdashboard
wmcs
node_modules/ws/lib/event-target.js
addEventListener
function
/** * Register an event listener. * * @param {String} type A string representing the event type to listen for * @param {Function} listener The listener to add * @param {Object} [options] An options object specifies characteristics about * the event listener * @param {Boolean} [options.once=fals...
1,288,504
fdf828bf41aec7874373a6663748003a
swh:1:cnt:87a421329d451ad7fe68e4fdaa94573192e5234e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=26-39/
f192a1c9376f6f1a4e00cfdf7aa55a55a21c6ad9
wlbdashboard
wmcs
node_modules/ws/lib/extension.js
push
function
/** * Adds an offer to the map of extension offers or a parameter to the map of * parameters. * * @param {Object} dest The map of extension offers or parameters * @param {String} name The extension or parameter name * @param {(Object|Boolean|String)} elem The extension parameters or the * parameter value * ...
1,288,505
a0a007f6d57897e3fce10c5e8204143d
swh:1:cnt:87a421329d451ad7fe68e4fdaa94573192e5234e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=41-190/
f192a1c9376f6f1a4e00cfdf7aa55a55a21c6ad9
wlbdashboard
wmcs
node_modules/ws/lib/extension.js
parse
function
/** * Parses the `Sec-WebSocket-Extensions` header into an object. * * @param {String} header The field value of the header * @return {Object} The parsed object * @public */ function parse(header) { const offers = Object.create(null); if (header === undefined || header === '') return offers; let params = ...
1,288,506
39e368ceeb6d4297481777c1cc81e15d
swh:1:cnt:87a421329d451ad7fe68e4fdaa94573192e5234e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=192-221/
f192a1c9376f6f1a4e00cfdf7aa55a55a21c6ad9
wlbdashboard
wmcs
node_modules/ws/lib/extension.js
format
function
/** * Builds the `Sec-WebSocket-Extensions` header field value. * * @param {Object} extensions The map of extensions and parameters to format * @return {String} A string representing the given object * @public */ function format(extensions) { return Object.keys(extensions) .map((extension) => { let co...
1,288,507
2c5f472fd3fcf95f3dc6e4e50554c911
swh:1:cnt:3fd35784ea9ea59cff8c112b6556a89cde7f7b6f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=6-53/
ccb12d71110e9cdbf44801917b367dc5ab918666
wlbdashboard
wmcs
node_modules/ws/lib/limiter.js
Limiter
type
/** * A very simple job queue with adjustable concurrency. Adapted from * https://github.com/STRML/async-limiter */ class Limiter { /** * Creates a new `Limiter`. * * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed * to run concurrently */ constructor(concurrency) { ...
1,288,508
7107f22a6e007f6dd520b369af78ee42
swh:1:cnt:3fd35784ea9ea59cff8c112b6556a89cde7f7b6f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=11-25/
ccb12d71110e9cdbf44801917b367dc5ab918666
wlbdashboard
wmcs
node_modules/ws/lib/limiter.js
Limiter::constructor
function
/** * Creates a new `Limiter`. * * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed * to run concurrently */ constructor(concurrency) { this[kDone] = () => { this.pending--; this[kRun](); }; this.concurrency = concurrency || Infinity; this.jobs =...
1,288,509
3e940d169ddf1057394bf77c90e48abe
swh:1:cnt:3fd35784ea9ea59cff8c112b6556a89cde7f7b6f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=38-52/
ccb12d71110e9cdbf44801917b367dc5ab918666
wlbdashboard
wmcs
node_modules/ws/lib/limiter.js
Limiter::[kRun]
function
/** * Removes a job from the queue and runs it if possible. * * @private */ [kRun]() { if (this.pending === this.concurrency) return; if (this.jobs.length) { const job = this.jobs.shift(); this.pending++; job(this[kDone]); } }
1,288,510
90c08142724523edb2c853ab209cee50
swh:1:cnt:3fd35784ea9ea59cff8c112b6556a89cde7f7b6f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=27-36/
ccb12d71110e9cdbf44801917b367dc5ab918666
wlbdashboard
wmcs
node_modules/ws/lib/limiter.js
Limiter::add
function
/** * Adds a job to the queue. * * @param {Function} job The job to run * @public */ add(job) { this.jobs.push(job); this[kRun](); }
1,288,511
163ed6da58fc343592a9838e7299bebd
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=25-465/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
PerMessageDeflate
type
/** * permessage-deflate implementation. */ class PerMessageDeflate { /** * Creates a PerMessageDeflate instance. * * @param {Object} [options] Configuration options * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept * disabling of server context takeover * @param {Boole...
1,288,512
7789cf6b710c14d7248bcba851e31d6a
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=29-71/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
PerMessageDeflate::constructor
function
/** * Creates a PerMessageDeflate instance. * * @param {Object} [options] Configuration options * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept * disabling of server context takeover * @param {Boolean} [options.clientNoContextTakeover=false] Advertise/ * acknowledg...
1,288,513
5d372e652494814a2503183969519937
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=80-105/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
PerMessageDeflate::offer
function
/** * Create an extension negotiation offer. * * @return {Object} Extension parameters * @public */ offer() { const params = {}; if (this._options.serverNoContextTakeover) { params.server_no_context_takeover = true; } if (this._options.clientNoContextTakeover) { params.clie...
1,288,514
13e5e0b8cad173e573a39496d5c19685
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=124-149/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
PerMessageDeflate::cleanup
function
/** * Releases all resources used by the extension. * * @public */ cleanup() { if (this._inflate) { this._inflate.close(); this._inflate = null; } if (this._deflate) { const callback = this._deflate[kCallback]; this._deflate.close(); this._deflate = null; ...
1,288,515
006ec7a2f6caf3fb9d418ced4d312bc1
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=107-122/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
PerMessageDeflate::accept
function
/** * Accept an extension negotiation offer/response. * * @param {Array} configurations The extension negotiation offers/reponse * @return {Object} Accepted configuration * @public */ accept(configurations) { configurations = this.normalizeParams(configurations); this.params = this._isServe...
1,288,516
63c16db5b756f27a24da909a135c2ed2
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=73-78/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
PerMessageDeflate::extensionName
function
/** * @type {String} */ static get extensionName() { return 'permessage-deflate'; }
1,288,517
009b7857df7865cd796e33f2bd7b0af0
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=151-200/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
PerMessageDeflate::acceptAsServer
function
/** * Accept an extension negotiation offer. * * @param {Array} offers The extension negotiation offers * @return {Object} Accepted configuration * @private */ acceptAsServer(offers) { const opts = this._options; const accepted = offers.find((params) => { if ( (opts.serverNoCo...
1,288,518
c2097b97e75e245d6cb949885c9ac01a
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=202-234/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
PerMessageDeflate::acceptAsClient
function
/** * Accept the extension negotiation response. * * @param {Array} response The extension negotiation response * @return {Object} Accepted configuration * @private */ acceptAsClient(response) { const params = response[0]; if ( this._options.clientNoContextTakeover === false && ...
1,288,519
4fabea3a721055a51421f6ae2cb86edf
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=236-294/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
PerMessageDeflate::normalizeParams
function
/** * Normalize parameters. * * @param {Array} configurations The extension negotiation offers/reponse * @return {Array} The offers/response with normalized parameters * @private */ normalizeParams(configurations) { configurations.forEach((params) => { Object.keys(params).forEach((key) => ...
1,288,520
23781ec2f81efefe82d5413344b4571e
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=296-311/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
PerMessageDeflate::decompress
function
/** * Decompress data. Concurrency limited. * * @param {Buffer} data Compressed data * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @public */ decompress(data, fin, callback) { zlibLimiter.add((done) => { this._decompres...
1,288,521
6c40302181006aa1f7c069156a21c95b
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=313-328/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
PerMessageDeflate::compress
function
/** * Compress data. Concurrency limited. * * @param {Buffer} data Data to compress * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @public */ compress(data, fin, callback) { zlibLimiter.add((done) => { this._compress(dat...
1,288,522
b76ec377abedd87fe46be44d0f6db062
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=395-464/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
PerMessageDeflate::_compress
function
/** * Compress data. * * @param {Buffer} data Data to compress * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @private */ _compress(data, fin, callback) { const endpoint = this._isServer ? 'server' : 'client'; if (!this._...
1,288,523
8b6f2a36e9229e49966909e4182c1dca
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=469-478/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
deflateOnData
function
/** * The listener of the `zlib.DeflateRaw` stream `'data'` event. * * @param {Buffer} chunk A chunk of data * @private */ function deflateOnData(chunk) { this[kBuffers].push(chunk); this[kTotalLength] += chunk.length; }
1,288,524
de72554df255a7cc0d40964d7ffa7a1d
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=330-393/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
PerMessageDeflate::_decompress
function
/** * Decompress data. * * @param {Buffer} data Compressed data * @param {Boolean} fin Specifies whether or not this is the last fragment * @param {Function} callback Callback * @private */ _decompress(data, fin, callback) { const endpoint = this._isServer ? 'client' : 'server'; if (!thi...
1,288,525
6889a877d39273b3ec524a3a0496dbc3
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=480-502/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
inflateOnData
function
/** * The listener of the `zlib.InflateRaw` stream `'data'` event. * * @param {Buffer} chunk A chunk of data * @private */ function inflateOnData(chunk) { this[kTotalLength] += chunk.length; if ( this[kPerMessageDeflate]._maxPayload < 1 || this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload )...
1,288,526
a12c95ab51f8533c025238846b2df744
swh:1:cnt:ce91784295cd73b91f657b6a49f4a9979ebeb7a8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=504-518/
8f5c4d8a37f5e5dc8c60da7109c317689c3ce003
wlbdashboard
wmcs
node_modules/ws/lib/permessage-deflate.js
inflateOnError
function
/** * The listener of the `zlib.InflateRaw` stream `'error'` event. * * @param {Error} err The emitted error * @private */ function inflateOnError(err) { // // There is no need to call `Zlib#close()` as the handle is automatically // closed when an error is emitted. // this[kPerMessageDeflate]._inflate =...
1,288,527
d0ea9c6f889c3cbddb483940e3ac0b84
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=22-582/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver
type
/** * HyBi Receiver implementation. * * @extends Writable */ class Receiver extends Writable { /** * Creates a Receiver instance. * * @param {String} [binaryType=nodebuffer] The type for binary data * @param {Object} [extensions] An object containing the negotiated extensions * @param {Boolean} [is...
1,288,528
fc9a5135d67947b2d4fba986fe058a25
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=28-63/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver::constructor
function
/** * Creates a Receiver instance. * * @param {String} [binaryType=nodebuffer] The type for binary data * @param {Object} [extensions] An object containing the negotiated extensions * @param {Boolean} [isServer=false] Specifies whether to operate in client or * server mode * @param {Number} [ma...
1,288,529
cfc42ab3ad68ed6c8aef488679bb8093
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=65-79/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver::_write
function
/** * Implements `Writable.prototype._write()`. * * @param {Buffer} chunk The chunk of data to write * @param {String} encoding The character encoding of `chunk` * @param {Function} cb Callback * @private */ _write(chunk, encoding, cb) { if (this._opcode === 0x08 && this._state == GET_INFO) r...
1,288,530
d3d9aee342ec16bd2d72f6f3d4a7207a
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=155-306/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver::getInfo
function
/** * Reads the first two bytes of a frame. * * @return {(RangeError|undefined)} A possible error * @private */ getInfo() { if (this._bufferedBytes < 2) { this._loop = false; return; } const buf = this.consume(2); if ((buf[0] & 0x30) !== 0x00) { this._loop = false; ...
1,288,531
38dabd70c327d656a0a910921ad75195
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=81-116/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver::consume
function
/** * Consumes `n` bytes from the buffered data. * * @param {Number} n The number of bytes to consume * @return {Buffer} The consumed bytes * @private */ consume(n) { this._bufferedBytes -= n; if (n === this._buffers[0].length) return this._buffers.shift(); if (n < this._buffers[0].len...
1,288,532
237fab3479ee35c5211ab332222e9c73
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=118-153/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver::startLoop
function
/** * Starts the parsing loop. * * @param {Function} cb Callback * @private */ startLoop(cb) { let err; this._loop = true; do { switch (this._state) { case GET_INFO: err = this.getInfo(); break; case GET_PAYLOAD_LENGTH_16: err = this.getP...
1,288,533
40819d219148a2caabfd3c6cf5cc55cf
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=308-322/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver::getPayloadLength16
function
/** * Gets extended payload length (7+16). * * @return {(RangeError|undefined)} A possible error * @private */ getPayloadLength16() { if (this._bufferedBytes < 2) { this._loop = false; return; } this._payloadLength = this.consume(2).readUInt16BE(0); return this.haveLength()...
1,288,534
e53f1a7a27f804fd9b861e31aa6c15dc
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=324-356/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver::getPayloadLength64
function
/** * Gets extended payload length (7+64). * * @return {(RangeError|undefined)} A possible error * @private */ getPayloadLength64() { if (this._bufferedBytes < 8) { this._loop = false; return; } const buf = this.consume(8); const num = buf.readUInt32BE(0); // // Th...
1,288,535
8e158f0e1e9d88bed11d7fb52f76e8de
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=358-381/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver::haveLength
function
/** * Payload length has been read. * * @return {(RangeError|undefined)} A possible error * @private */ haveLength() { if (this._payloadLength && this._opcode < 0x08) { this._totalPayloadLength += this._payloadLength; if (this._totalPayloadLength > this._maxPayload && this._maxPayload >...
1,288,536
1f4e4e54ae459bdfd48954c4099b6a6b
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=383-396/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver::getMask
function
/** * Reads mask bytes. * * @private */ getMask() { if (this._bufferedBytes < 4) { this._loop = false; return; } this._mask = this.consume(4); this._state = GET_DATA; }
1,288,537
6b9d80f9172b77d6727ea9d0cc3eb53c
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=398-436/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver::getData
function
/** * Reads data bytes. * * @param {Function} cb Callback * @return {(Error|RangeError|undefined)} A possible error * @private */ getData(cb) { let data = EMPTY_BUFFER; if (this._payloadLength) { if (this._bufferedBytes < this._payloadLength) { this._loop = false; retu...
1,288,538
29ff89ddc4d0b140972b0ae9ec21049f
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=475-522/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver::dataMessage
function
/** * Handles a data message. * * @return {(Error|undefined)} A possible error * @private */ dataMessage() { if (this._fin) { const messageLength = this._messageLength; const fragments = this._fragments; this._totalPayloadLength = 0; this._messageLength = 0; this._fra...
1,288,539
ed96db30bc892b9b51fcd2542b669af3
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=438-473/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver::decompress
function
/** * Decompresses data. * * @param {Buffer} data Compressed data * @param {Function} cb Callback * @private */ decompress(data, cb) { const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; perMessageDeflate.decompress(data, this._fin, (err, buf) => { if (err) re...
1,288,540
7908284f94f988fa853096a2cc8e48c8
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=524-581/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
Receiver::controlMessage
function
/** * Handles a control message. * * @param {Buffer} data Data to handle * @return {(Error|RangeError|undefined)} A possible error * @private */ controlMessage(data) { if (this._opcode === 0x08) { this._loop = false; if (data.length === 0) { this.emit('conclude', 1005, ''); ...
1,288,541
936f693ea27fde5b6afcd57bc0421002
swh:1:cnt:1d2af76e1f25644e25323420619f47baf1f0f043;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=586-607/
fad1cfa28e739821f20a67b676f31038dbbde880
wlbdashboard
wmcs
node_modules/ws/lib/receiver.js
error
function
/** * Builds an error object. * * @param {function(new:Error|RangeError)} ErrorCtor The error constructor * @param {String} message The error message * @param {Boolean} prefix Specifies whether or not to add a default prefix to * `message` * @param {Number} statusCode The status code * @param {String} error...
1,288,542
618f6c7bb0e6be2be037b83d79f328ad
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=16-407/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender
type
/** * HyBi Sender implementation. */ class Sender { /** * Creates a Sender instance. * * @param {(net.Socket|tls.Socket)} socket The connection socket * @param {Object} [extensions] An object containing the negotiated extensions */ constructor(socket, extensions) { this._extensions = extensions...
1,288,543
0995c3ef216d2a8182976b1c48781fbb
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=20-36/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender::constructor
function
/** * Creates a Sender instance. * * @param {(net.Socket|tls.Socket)} socket The connection socket * @param {Object} [extensions] An object containing the negotiated extensions */ constructor(socket, extensions) { this._extensions = extensions || {}; this._socket = socket; this._firstFragm...
1,288,544
7cb02ce0af3f5c94af2b9310ff0309bd
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=139-158/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender::doClose
function
/** * Frames and sends a close message. * * @param {Buffer} data The message to send * @param {Boolean} [mask=false] Specifies whether or not to mask `data` * @param {Function} [cb] Callback * @private */ doClose(data, mask, cb) { this.sendFrame( Sender.frame(data, { fin: true, ...
1,288,545
2481d644600581b523e8401ca2f6b03f
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=101-137/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender::close
function
/** * Sends a close message to the other peer. * * @param {Number} [code] The status code component of the body * @param {String} [data] The message component of the body * @param {Boolean} [mask=false] Specifies whether or not to mask the message * @param {Function} [cb] Callback * @public */ ...
1,288,546
65c0081580532d22979e921f69f790b5
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=160-180/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender::ping
function
/** * Sends a ping message to the other peer. * * @param {*} data The message to send * @param {Boolean} [mask=false] Specifies whether or not to mask `data` * @param {Function} [cb] Callback * @public */ ping(data, mask, cb) { const buf = toBuffer(data); if (buf.length > 125) { th...
1,288,547
acdfac157eadd8f1c450af87fdabebb3
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=38-99/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender::frame
function
/** * Frames a piece of data according to the HyBi WebSocket protocol. * * @param {Buffer} data The data to frame * @param {Object} options Options object * @param {Number} options.opcode The opcode * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be * modified * @par...
1,288,548
072b84dc1dfef5407f46520e7d1d096a
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=182-202/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender::doPing
function
/** * Frames and sends a ping message. * * @param {Buffer} data The message to send * @param {Boolean} [mask=false] Specifies whether or not to mask `data` * @param {Boolean} [readOnly=false] Specifies whether `data` can be modified * @param {Function} [cb] Callback * @private */ doPing(data, ...
1,288,549
6dff39a72263e57cab054f963df5e701
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=204-224/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender::pong
function
/** * Sends a pong message to the other peer. * * @param {*} data The message to send * @param {Boolean} [mask=false] Specifies whether or not to mask `data` * @param {Function} [cb] Callback * @public */ pong(data, mask, cb) { const buf = toBuffer(data); if (buf.length > 125) { th...
1,288,550
4ba7f1ed02182690db1aab75148af532
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=226-246/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender::doPong
function
/** * Frames and sends a pong message. * * @param {Buffer} data The message to send * @param {Boolean} [mask=false] Specifies whether or not to mask `data` * @param {Boolean} [readOnly=false] Specifies whether `data` can be modified * @param {Function} [cb] Callback * @private */ doPong(data, ...
1,288,551
59847c731723a2e2cfed5a5971aef935
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=248-309/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender::send
function
/** * Sends a data message to the other peer. * * @param {*} data The message to send * @param {Object} options Options object * @param {Boolean} [options.compress=false] Specifies whether or not to * compress `data` * @param {Boolean} [options.binary=false] Specifies whether `data` is binary ...
1,288,552
f8fc81c3002b8fe2aba326e47e4ac966
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=311-363/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender::dispatch
function
/** * Dispatches a data message. * * @param {Buffer} data The message to send * @param {Boolean} [compress=false] Specifies whether or not to compress * `data` * @param {Object} options Options object * @param {Number} options.opcode The opcode * @param {Boolean} [options.readOnly=false] Spe...
1,288,553
f1ba72a3936154144a3d19955e5dfce1
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=365-377/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender::dequeue
function
/** * Executes queued send operations. * * @private */ dequeue() { while (!this._deflating && this._queue.length) { const params = this._queue.shift(); this._bufferedBytes -= params[1].length; Reflect.apply(params[0], this, params.slice(1)); } }
1,288,554
e6ced9954d14b3a498d8b2878b6fa7ac
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=390-406/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender::sendFrame
function
/** * Sends a frame. * * @param {Buffer[]} list The frame to send * @param {Function} [cb] Callback * @private */ sendFrame(list, cb) { if (list.length === 2) { this._socket.cork(); this._socket.write(list[0]); this._socket.write(list[1], cb); this._socket.uncork(); }...
1,288,555
f68bfe17a6f3b2f6b83f4310d81aca5d
swh:1:cnt:441171c579574f37d7f21f76df5837af6b6104fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=379-388/
f3944cdf91c1a61d9168c36eb1438c60451d4d9d
wlbdashboard
wmcs
node_modules/ws/lib/sender.js
Sender::enqueue
function
/** * Enqueues a send operation. * * @param {Array} params Send operation parameters. * @private */ enqueue(params) { this._bufferedBytes += params[1].length; this._queue.push(params); }
1,288,556
6194ae1d95372c1d8dff60098e1121f2
swh:1:cnt:19e1bff4a1a9f5d071e1cbb85717b6a4fa96b03c;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=5-13/
c8dc156d052d8acc136ec4c6447f3fabe4188900
wlbdashboard
wmcs
node_modules/ws/lib/stream.js
emitClose
function
/** * Emits the `'close'` event on a stream. * * @param {Duplex} stream The stream. * @private */ function emitClose(stream) { stream.emit('close'); }
1,288,557
d9bd7e671ec75073ba61a6cbc4e4b19b
swh:1:cnt:19e1bff4a1a9f5d071e1cbb85717b6a4fa96b03c;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=41-178/
c8dc156d052d8acc136ec4c6447f3fabe4188900
wlbdashboard
wmcs
node_modules/ws/lib/stream.js
createWebSocketStream
function
/** * Wraps a `WebSocket` in a duplex stream. * * @param {WebSocket} ws The `WebSocket` to wrap * @param {Object} [options] The options for the `Duplex` constructor * @return {Duplex} The duplex stream * @public */ function createWebSocketStream(ws, options) { let resumeOnReceiverDrain = true; let terminateO...
1,288,558
83b45c374546389aefa531e136595979
swh:1:cnt:19e1bff4a1a9f5d071e1cbb85717b6a4fa96b03c;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=15-24/
c8dc156d052d8acc136ec4c6447f3fabe4188900
wlbdashboard
wmcs
node_modules/ws/lib/stream.js
duplexOnEnd
function
/** * The listener of the `'end'` event. * * @private */ function duplexOnEnd() { if (!this.destroyed && this._writableState.finished) { this.destroy(); } }
1,288,559
fe0a5bd66327d811db0687f498fcb1ae
swh:1:cnt:19e1bff4a1a9f5d071e1cbb85717b6a4fa96b03c;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=53-55/
c8dc156d052d8acc136ec4c6447f3fabe4188900
wlbdashboard
wmcs
node_modules/ws/lib/stream.js
createWebSocketStream::receiverOnDrain
function
function receiverOnDrain() { if (resumeOnReceiverDrain) ws._socket.resume(); }
1,288,560
780f861416461ebced101ca2add2a734
swh:1:cnt:19e1bff4a1a9f5d071e1cbb85717b6a4fa96b03c;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=26-39/
c8dc156d052d8acc136ec4c6447f3fabe4188900
wlbdashboard
wmcs
node_modules/ws/lib/stream.js
duplexOnError
function
/** * The listener of the `'error'` event. * * @param {Error} err The error * @private */ function duplexOnError(err) { this.removeListener('error', duplexOnError); this.destroy(); if (this.listenerCount('error') === 0) { // Do not suppress the throwing behavior. this.emit('error', err); } }
1,288,561
826f00a7d4c9c3ae9bf4ae3874ebd9ec
swh:1:cnt:169ac6f0631515811a79b131b3e228fab9a04a3f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=3-19/
79a41f94c60f6ffe4c7c36ce4359aaecfe2af497
wlbdashboard
wmcs
node_modules/ws/lib/validation.js
isValidStatusCode
function
/** * Checks if a status code is allowed in a close frame. * * @param {Number} code The status code * @return {Boolean} `true` if the status code is valid, else `false` * @public */ function isValidStatusCode(code) { return ( (code >= 1000 && code <= 1014 && code !== 1004 && code !== 1005 ...
1,288,562
d286f13094062acec1a38cbeb6da5cbe
swh:1:cnt:169ac6f0631515811a79b131b3e228fab9a04a3f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=95-97/
79a41f94c60f6ffe4c7c36ce4359aaecfe2af497
wlbdashboard
wmcs
node_modules/ws/lib/validation.js
isValidUTF8
function
isValidUTF8(buf) { return buf.length < 150 ? _isValidUTF8(buf) : isValidUTF8(buf); }
1,288,563
5b22059da3e5f7863dcbc1fc2666dd0c
swh:1:cnt:169ac6f0631515811a79b131b3e228fab9a04a3f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=21-83/
79a41f94c60f6ffe4c7c36ce4359aaecfe2af497
wlbdashboard
wmcs
node_modules/ws/lib/validation.js
_isValidUTF8
function
/** * Checks if a given buffer contains only correct UTF-8. * Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by * Markus Kuhn. * * @param {Buffer} buf The buffer to check * @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false` * @public */ function _isValidUTF8(buf) { con...
1,288,564
48ca0958faf70b85c688b67e36be9fad
swh:1:cnt:8ead7d4a0fc776d8bc43c15b92ebf37d438a8559;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=23-362/
6303ff091b5bf5f7eafdcbbaeaddce919dfd590c
wlbdashboard
wmcs
node_modules/ws/lib/websocket-server.js
WebSocketServer
type
/** * Class representing a WebSocket server. * * @extends EventEmitter */ class WebSocketServer extends EventEmitter { /** * Create a `WebSocketServer` instance. * * @param {Object} options Configuration options * @param {Number} [options.backlog=511] The maximum length of the queue of * pendin...
1,288,565
7b557ca2693a0e41ddc98a65cc3e3c97
swh:1:cnt:8ead7d4a0fc776d8bc43c15b92ebf37d438a8559;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=29-116/
6303ff091b5bf5f7eafdcbbaeaddce919dfd590c
wlbdashboard
wmcs
node_modules/ws/lib/websocket-server.js
WebSocketServer::constructor
function
/** * Create a `WebSocketServer` instance. * * @param {Object} options Configuration options * @param {Number} [options.backlog=511] The maximum length of the queue of * pending connections * @param {Boolean} [options.clientTracking=true] Specifies whether or not to * track clients * @pa...
1,288,566
e8f20aaf62c18acd080f927231e24280
swh:1:cnt:8ead7d4a0fc776d8bc43c15b92ebf37d438a8559;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=118-134/
6303ff091b5bf5f7eafdcbbaeaddce919dfd590c
wlbdashboard
wmcs
node_modules/ws/lib/websocket-server.js
WebSocketServer::address
function
/** * Returns the bound address, the address family name, and port of the server * as reported by the operating system if listening on an IP socket. * If the server is listening on a pipe or UNIX domain socket, the name is * returned as a string. * * @return {(Object|String|null)} The address of the s...
1,288,567
45e5cf8bd9b07c5959a95cd52e477ac5
swh:1:cnt:8ead7d4a0fc776d8bc43c15b92ebf37d438a8559;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=196-274/
6303ff091b5bf5f7eafdcbbaeaddce919dfd590c
wlbdashboard
wmcs
node_modules/ws/lib/websocket-server.js
WebSocketServer::handleUpgrade
function
/** * Handle a HTTP Upgrade request. * * @param {http.IncomingMessage} req The request object * @param {(net.Socket|tls.Socket)} socket The network socket between the * server and client * @param {Buffer} head The first packet of the upgraded stream * @param {Function} cb Callback * @public ...
1,288,568
c60dde2c4867470b2bef49c670df5a55
swh:1:cnt:8ead7d4a0fc776d8bc43c15b92ebf37d438a8559;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=178-194/
6303ff091b5bf5f7eafdcbbaeaddce919dfd590c
wlbdashboard
wmcs
node_modules/ws/lib/websocket-server.js
WebSocketServer::shouldHandle
function
/** * See if a given request should be handled by this server instance. * * @param {http.IncomingMessage} req Request object to inspect * @return {Boolean} `true` if the request is valid, else `false` * @public */ shouldHandle(req) { if (this.options.path) { const index = req.url.indexOf('...
1,288,569
7900258ad8355c23a9ff1be4caa54d39
swh:1:cnt:8ead7d4a0fc776d8bc43c15b92ebf37d438a8559;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=136-176/
6303ff091b5bf5f7eafdcbbaeaddce919dfd590c
wlbdashboard
wmcs
node_modules/ws/lib/websocket-server.js
WebSocketServer::close
function
/** * Close the server. * * @param {Function} [cb] Callback * @public */ close(cb) { if (cb) this.once('close', cb); if (this._state === CLOSED) { process.nextTick(emitClose, this); return; } if (this._state === CLOSING) return; this._state = CLOSING; // // Te...
1,288,570
2cacc7244bf672728508d984ec91460d
swh:1:cnt:8ead7d4a0fc776d8bc43c15b92ebf37d438a8559;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=276-361/
6303ff091b5bf5f7eafdcbbaeaddce919dfd590c
wlbdashboard
wmcs
node_modules/ws/lib/websocket-server.js
WebSocketServer::completeUpgrade
function
/** * Upgrade the connection to WebSocket. * * @param {String} key The value of the `Sec-WebSocket-Key` header * @param {Object} extensions The accepted extensions * @param {http.IncomingMessage} req The request object * @param {(net.Socket|tls.Socket)} socket The network socket between the * s...
1,288,571
a855651963ebe3e6bba07058be13f55e
swh:1:cnt:8ead7d4a0fc776d8bc43c15b92ebf37d438a8559;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=366-384/
6303ff091b5bf5f7eafdcbbaeaddce919dfd590c
wlbdashboard
wmcs
node_modules/ws/lib/websocket-server.js
addListeners
function
/** * Add event listeners on an `EventEmitter` using a map of <event, listener> * pairs. * * @param {EventEmitter} server The event emitter * @param {Object.<String, Function>} map The listeners to add * @return {Function} A function that will remove the added listeners when * called * @private */ function...
1,288,572
d2058806e142549d27216038597ab3fc
swh:1:cnt:8ead7d4a0fc776d8bc43c15b92ebf37d438a8559;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=386-395/
6303ff091b5bf5f7eafdcbbaeaddce919dfd590c
wlbdashboard
wmcs
node_modules/ws/lib/websocket-server.js
emitClose
function
/** * Emit a `'close'` event on an `EventEmitter`. * * @param {EventEmitter} server The event emitter * @private */ function emitClose(server) { server._state = CLOSED; server.emit('close'); }
1,288,573
4761153c5ac89e1779db738dc8927674
swh:1:cnt:8ead7d4a0fc776d8bc43c15b92ebf37d438a8559;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=397-404/
6303ff091b5bf5f7eafdcbbaeaddce919dfd590c
wlbdashboard
wmcs
node_modules/ws/lib/websocket-server.js
socketOnError
function
/** * Handle premature socket errors. * * @private */ function socketOnError() { this.destroy(); }
1,288,574
66f36b5bff939a5921d44bec71c9bb6f
swh:1:cnt:8ead7d4a0fc776d8bc43c15b92ebf37d438a8559;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=406-437/
6303ff091b5bf5f7eafdcbbaeaddce919dfd590c
wlbdashboard
wmcs
node_modules/ws/lib/websocket-server.js
abortHandshake
function
/** * Close the connection when preconditions are not fulfilled. * * @param {(net.Socket|tls.Socket)} socket The socket of the upgrade request * @param {Number} code The HTTP response status code * @param {String} [message] The HTTP response body * @param {Object} [headers] Additional HTTP response headers * @pr...
1,288,575
fcee09cf21810c2de5af39b910546383
swh:1:cnt:8ead7d4a0fc776d8bc43c15b92ebf37d438a8559;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=439-449/
6303ff091b5bf5f7eafdcbbaeaddce919dfd590c
wlbdashboard
wmcs
node_modules/ws/lib/websocket-server.js
trim
function
/** * Remove whitespace characters from both ends of a string. * * @param {String} str The string * @return {String} A new string representing `str` stripped of whitespace * characters from both its beginning and end * @private */ function trim(str) { return str.trim(); }
1,288,576
1914429dc3e613b7fbddf5e7dd897d50
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=33-441/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket
type
/** * Class representing a WebSocket. * * @extends EventEmitter */ class WebSocket extends EventEmitter { /** * Create a new `WebSocket`. * * @param {(String|URL)} address The URL to which to connect * @param {(String|String[])} [protocols] The subprotocols * @param {Object} [options] Connection op...
1,288,577
0e9f3edd9c2ec6ef4cf0adca28abf983
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=39-78/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket::constructor
function
/** * Create a new `WebSocket`. * * @param {(String|URL)} address The URL to which to connect * @param {(String|String[])} [protocols] The subprotocols * @param {Object} [options] Connection options */ constructor(address, protocols, options) { super(); this._binaryType = BINARY_TYPES[0]; ...
1,288,578
28607405c377f20758ac5269ae110db6
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=102-109/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket::bufferedAmount
function
/** * @type {Number} */ get bufferedAmount() { if (!this._socket) return this._bufferedAmount; return this._socket._writableState.length + this._sender._bufferedBytes; }
1,288,579
e95f87705f9e011df0382711ddab85ec
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=91-100/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket::binaryType
function
set binaryType(type) { if (!BINARY_TYPES.includes(type)) return; this._binaryType = type; // // Allow to change `binaryType` on the fly. // if (this._receiver) this._receiver._binaryType = type; }
1,288,580
a2f2a329365d06e4ae829c00d88d7ea1
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=118-124/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket::onclose
function
/** * @type {Function} */ /* istanbul ignore next */ get onclose() { return undefined; }
1,288,581
cf350c61fffe860e5d12d51650325d0c
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=140-146/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket::onopen
function
/** * @type {Function} */ /* istanbul ignore next */ get onopen() { return undefined; }
1,288,582
e8763421c899731306b67bb08e6414a9
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=176-181/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket::url
function
/** * @type {String} */ get url() { return this._url; }
1,288,583
770400faa54698bbeaee34dc783c8983
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=249-311/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket::close
function
/** * Start a closing handshake. * * +----------+ +-----------+ +----------+ * - - -|ws.close()|-->|close frame|-->|ws.close()|- - - * | +----------+ +-----------+ +----------+ | * +----------+ +-----------+ | * CLOSING |ws.close()|<--|close frame...
1,288,584
07f9f8213236089482c77001760ca6a9
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=559-886/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
initAsClient
function
/** * Initialize a WebSocket client. * * @param {WebSocket} websocket The client to initialize * @param {(String|URL)} address The URL to which to connect * @param {String} [protocols] The subprotocols * @param {Object} [options] Connection options * @param {(Boolean|Object)} [options.perMessageDeflate=true] Ena...
1,288,585
2d42cb285f4f28da7c2a91fdd76f1389
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1063-1071/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
receiverOnMessage
function
/** * The listener of the `Receiver` `'message'` event. * * @param {(String|Buffer|ArrayBuffer|Buffer[])} data The message * @private */ function receiverOnMessage(data) { this[kWebSocket].emit('message', data); }
1,288,586
25ceafe3bf0c9dc5fbf4be1714a25ce7
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=228-247/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket::emitClose
function
/** * Emit the `'close'` event. * * @private */ emitClose() { if (!this._socket) { this._readyState = WebSocket.CLOSED; this.emit('close', this._closeCode, this._closeMessage); return; } if (this._extensions[PerMessageDeflate.extensionName]) { this._extensions[PerMessa...
1,288,587
983364ca79113534dc2272723610bdf5
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=169-174/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket::readyState
function
/** * @type {Number} */ get readyState() { return this._readyState; }
1,288,588
f1c8f2656fd19f41d612d547ac8f2dae
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=313-343/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket::ping
function
/** * Send a ping. * * @param {*} [data] The data to send * @param {Boolean} [mask] Indicates whether or not to mask `data` * @param {Function} [cb] Callback which is executed when the ping is sent * @public */ ping(data, mask, cb) { if (this.readyState === WebSocket.CONNECTING) { throw...
1,288,589
85bad39a8a69a9431bbff5d48a470ce7
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=930-964/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
abortHandshake
function
/** * Abort the handshake and emit an error. * * @param {WebSocket} websocket The WebSocket instance * @param {(http.ClientRequest|net.Socket|tls.Socket)} stream The request to * abort or the socket to destroy * @param {String} message The error message * @private */ function abortHandshake(websocket, strea...
1,288,590
7436466e64261bc97f2ad0c183d6af87
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1021-1028/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
receiverOnDrain
function
/** * The listener of the `Receiver` `'drain'` event. * * @private */ function receiverOnDrain() { this[kWebSocket]._socket.resume(); }
1,288,591
34c8da513ac38b21ac3bbe4008178f20
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1054-1061/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
receiverOnFinish
function
/** * The listener of the `Receiver` `'finish'` event. * * @private */ function receiverOnFinish() { this[kWebSocket].emitClose(); }
1,288,592
546c0d4bc82e1e2cc2b70fd545d52539
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1086-1094/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
receiverOnPong
function
/** * The listener of the `Receiver` `'pong'` event. * * @param {Buffer} data The data included in the pong frame * @private */ function receiverOnPong(data) { this[kWebSocket].emit('pong', data); }
1,288,593
d5b83364dc51ff97c2d481fe0cdae48e
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1106-1155/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
socketOnClose
function
/** * The listener of the `net.Socket` `'close'` event. * * @private */ function socketOnClose() { const websocket = this[kWebSocket]; this.removeListener('close', socketOnClose); this.removeListener('data', socketOnData); this.removeListener('end', socketOnEnd); websocket._readyState = WebSocket.CLOSIN...
1,288,594
c8047c1008eb9a52a6928028b3399201
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1169-1180/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
socketOnEnd
function
/** * The listener of the `net.Socket` `'end'` event. * * @private */ function socketOnEnd() { const websocket = this[kWebSocket]; websocket._readyState = WebSocket.CLOSING; websocket._receiver.end(); this.end(); }
1,288,595
93789cb7ffbc06d8d7a03f1792148dcc
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1182-1197/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
socketOnError
function
/** * The listener of the `net.Socket` `'error'` event. * * @private */ function socketOnError() { const websocket = this[kWebSocket]; this.removeListener('error', socketOnError); this.on('error', NOOP); if (websocket) { websocket._readyState = WebSocket.CLOSING; this.destroy(); } }
1,288,596
03906e6a4c95a21288af4606e437a917
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1073-1084/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
receiverOnPing
function
/** * The listener of the `Receiver` `'ping'` event. * * @param {Buffer} data The data included in the ping frame * @private */ function receiverOnPing(data) { const websocket = this[kWebSocket]; websocket.pong(data, !websocket._isServer, NOOP); websocket.emit('ping', data); }
1,288,597
c100c3132b42d221437d35c3b3ffc380
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=111-116/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket::extensions
function
/** * @type {String} */ get extensions() { return Object.keys(this._extensions).join(); }
1,288,598
eff4513ada2d1ac5c884d443883d351d
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=151-157/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket::onmessage
function
/** * @type {Function} */ /* istanbul ignore next */ get onmessage() { return undefined; }
1,288,599
e55a3e9098c062f6fddf00618ae16b45
swh:1:cnt:14f82c8239c4e13352e8fadd6c2d2f00c80b7647;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=183-226/
9e2be3d621ce198b99f63138e9f26c209422fc37
wlbdashboard
wmcs
node_modules/ws/lib/websocket.js
WebSocket::setSocket
function
/** * Set up the socket and the internal resources. * * @param {(net.Socket|tls.Socket)} socket The network socket between the * server and client * @param {Buffer} head The first packet of the upgraded stream * @param {Number} [maxPayload=0] The maximum allowed message size * @private */ ...