Ignore:
Timestamp:
11/25/21 22:08:24 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
8d391a1
Parents:
59329aa
Message:

primeNG components

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/node_modules/ws/lib/receiver.js

    r59329aa re29cc2e  
    2929   * Creates a Receiver instance.
    3030   *
    31    * @param {String} [binaryType=nodebuffer] The type for binary data
    32    * @param {Object} [extensions] An object containing the negotiated extensions
    33    * @param {Boolean} [isServer=false] Specifies whether to operate in client or
    34    *     server mode
    35    * @param {Number} [maxPayload=0] The maximum allowed message length
    36    */
    37   constructor(binaryType, extensions, isServer, maxPayload) {
     31   * @param {String} binaryType The type for binary data
     32   * @param {Object} extensions An object containing the negotiated extensions
     33   * @param {Number} maxPayload The maximum allowed message length
     34   */
     35  constructor(binaryType, extensions, maxPayload) {
    3836    super();
    3937
     
    4139    this[kWebSocket] = undefined;
    4240    this._extensions = extensions || {};
    43     this._isServer = !!isServer;
    4441    this._maxPayload = maxPayload | 0;
    4542
     
    6966   * @param {String} encoding The character encoding of `chunk`
    7067   * @param {Function} cb Callback
    71    * @private
    7268   */
    7369  _write(chunk, encoding, cb) {
     
    10197    do {
    10298      const buf = this._buffers[0];
    103       const offset = dst.length - n;
    10499
    105100      if (n >= buf.length) {
    106         dst.set(this._buffers.shift(), offset);
     101        this._buffers.shift().copy(dst, dst.length - n);
    107102      } else {
    108         dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);
     103        buf.copy(dst, dst.length - n, 0, n);
    109104        this._buffers[0] = buf.slice(n);
    110105      }
     
    123118   */
    124119  startLoop(cb) {
    125     let err;
     120    var err;
    126121    this._loop = true;
    127122
     
    230225    this._masked = (buf[1] & 0x80) === 0x80;
    231226
    232     if (this._isServer) {
    233       if (!this._masked) {
    234         this._loop = false;
    235         return error(RangeError, 'MASK must be set', true, 1002);
    236       }
    237     } else if (this._masked) {
    238       this._loop = false;
    239       return error(RangeError, 'MASK must be clear', true, 1002);
    240     }
    241 
    242227    if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
    243228    else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;
     
    336321   */
    337322  getData(cb) {
    338     let data = EMPTY_BUFFER;
     323    var data = EMPTY_BUFFER;
    339324
    340325    if (this._payloadLength) {
     
    416401
    417402      if (this._opcode === 2) {
    418         let data;
     403        var data;
    419404
    420405        if (this._binaryType === 'nodebuffer') {
Note: See TracChangeset for help on using the changeset viewer.