Sha256: a259405ff36b3ae117a3046f7f30093f0ce38f9012d42baac96547c7bb09e2ec

Contents?: true

Size: 822 Bytes

Versions: 18

Compression:

Stored size: 822 Bytes

Contents

/*!
 * socket.io-node
 * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
 * MIT Licensed
 */

/**
 * Module requirements.
 */

var protocolVersions = require('./websocket/');

/**
 * Export the constructor.
 */

exports = module.exports = WebSocket;

/**
 * HTTP interface constructor. Interface compatible with all transports that
 * depend on request-response cycles.
 *
 * @api public
 */

function WebSocket (mng, data, req) {
  var transport
    , version = req.headers['sec-websocket-version'];
  if (typeof version !== 'undefined' && typeof protocolVersions[version] !== 'undefined') {
    transport = new protocolVersions[version](mng, data, req);
  }
  else transport = new protocolVersions['default'](mng, data, req);
  if (typeof this.name !== 'undefined') transport.name = this.name;
  return transport;
};

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
hooch-0.4.2 jasmine/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
hooch-0.4.1 jasmine/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
hooch-0.4.0 jasmine/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
hooch-0.3.0 jasmine/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
hooch-0.2.1 jasmine/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
hooch-0.2.0 jasmine/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
hooch-0.1.0 jasmine/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
hooch-0.0.8 jasmine/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
hooch-0.0.7 jasmine/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
hooch-0.0.6 jasmine/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
entangled-0.0.16 spec/dummy/public/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
entangled-0.0.15 spec/dummy/public/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
entangled-0.0.14 spec/dummy/public/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
entangled-0.0.13 spec/dummy/public/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
entangled-0.0.12 spec/dummy/public/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
entangled-0.0.11 spec/dummy/public/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
entangled-0.0.10 spec/dummy/public/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js
iron_worker_ng-0.10.1 iron_worker_examples/binary/phantom-nodejs/node_modules/phantom/node_modules/dnode/node_modules/socket.io/lib/transports/websocket.js