Mercurial > hg > nodescore
comparison node_modules/socket.io/lib/transports/websocket.js @ 69:333afcfd3f3a
added node_modules to project and fixed path to chronometer
also added deps to installer script
author | tzara <rc-web@kiben.net> |
---|---|
date | Sat, 26 Oct 2013 14:12:50 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:b076cd17638c | 69:333afcfd3f3a |
---|---|
1 | |
2 /*! | |
3 * socket.io-node | |
4 * Copyright(c) 2011 LearnBoost <dev@learnboost.com> | |
5 * MIT Licensed | |
6 */ | |
7 | |
8 /** | |
9 * Module requirements. | |
10 */ | |
11 | |
12 var protocolVersions = require('./websocket/'); | |
13 | |
14 /** | |
15 * Export the constructor. | |
16 */ | |
17 | |
18 exports = module.exports = WebSocket; | |
19 | |
20 /** | |
21 * HTTP interface constructor. Interface compatible with all transports that | |
22 * depend on request-response cycles. | |
23 * | |
24 * @api public | |
25 */ | |
26 | |
27 function WebSocket (mng, data, req) { | |
28 var transport | |
29 , version = req.headers['sec-websocket-version']; | |
30 if (typeof version !== 'undefined' && typeof protocolVersions[version] !== 'undefined') { | |
31 transport = new protocolVersions[version](mng, data, req); | |
32 } | |
33 else transport = new protocolVersions['default'](mng, data, req); | |
34 if (typeof this.name !== 'undefined') transport.name = this.name; | |
35 return transport; | |
36 }; |