UNPKG

fastcgi-stream

Version:

Fast FastCGI Stream wrapper for reading/writing FCGI records.

20 lines (15 loc) 468 B
'use strict'; var common = require('./common'); var Params = module.exports = function Params(params) { this.params = params || []; this.getSize = function() { return common.calculateNameValuePairsLength(this.params); }; this.write = function(buffer) { common.writeNameValuePairs(buffer, this.params); }; this.read = function(buffer) { this.params = common.readNameValuePairs(buffer); }; }; Params.prototype.TYPE = Params.TYPE = 4;