How to use the spdy.Response function in spdy

To help you get started, we’ve selected a few spdy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eee-c / express-spdy / express.js View on Github external
var exports = module.exports = express;

exports.createServer = function(options){
  if ('object' == typeof options) {
    return new SPDYServer(options, Array.prototype.slice.call(arguments, 1));
  } else {
    return expressCreateServer(Array.prototype.slice.call(arguments));
  }
};

exports.SPDYServer = SPDYServer;

var http = require('http')
  , res = http.ServerResponse.prototype
  , spdy = require('spdy')
  , spdy_res = spdy.Response.prototype;

// TODO: other methods?
spdy_res.send = res.send;
spdy_res.header = res.header;
spdy_res.contentType = res.contentType;
github eee-c / express-spdy / spdy.js View on Github external
/*!
 * Express - SPDYServer
 * Copyright(c) 2010 TJ Holowaychuk 
 * MIT Licensed
 */

/**
 * Module dependencies.
 */

var connect = require('connect-spdy')
  , express = require('express')
  , HTTPServer = express.HTTPServer
  , spdy = require('spdy')
  , spdy_res = spdy.Response.prototype
  , http = require('http')
  , res = http.ServerResponse.prototype;

/**
 * Expose `SPDYServer`.
 */

exports = module.exports = SPDYServer;

/**
 * Server proto.
 */

var app = SPDYServer.prototype;

/**

spdy

Implementation of the SPDY protocol on node.js.

MIT
Latest version published 4 years ago

Package Health Score

76 / 100
Full package analysis