/
var
/
www
/
myprog.com.ua
/
server
/
node
/
node_modules
/
socket.io-client
/
lib
/
/var/www/myprog.com.ua/server/node/node_modules/socket.io-client/lib
mkdir
upload
Name
Size
Mode
Actions
index.js
1502
0644
edit
dl
rm
manager.js
9740
0644
edit
dl
rm
on.js
370
0644
edit
dl
rm
socket.js
6903
0644
edit
dl
rm
url.js
1490
0644
edit
dl
rm
Edit:
/var/www/myprog.com.ua/server/node/node_modules/socket.io-client/lib/index.js
(1502B)
/** * Module dependencies. */ var url = require('./url'); var parser = require('socket.io-parser'); var Manager = require('./manager'); var debug = require('debug')('socket.io-client'); /** * Module exports. */ module.exports = exports = lookup; /** * Managers cache. */ var cache = exports.managers = {}; /** * Looks up an existing `Manager` for multiplexing. * If the user summons: * * `io('http://localhost/a');` * `io('http://localhost/b');` * * We reuse the existing instance based on same scheme/port/host, * and we initialize sockets for each namespace. * * @api public */ function lookup(uri, opts) { if (typeof uri == 'object') { opts = uri; uri = undefined; } opts = opts || {}; var parsed = url(uri); var source = parsed.source; var id = parsed.id; var io; if (opts.forceNew || opts['force new connection'] || false === opts.multiplex) { debug('ignoring socket cache for %s', source); io = Manager(source, opts); } else { if (!cache[id]) { debug('new io instance for %s', source); cache[id] = Manager(source, opts); } io = cache[id]; } return io.socket(parsed.path); } /** * Protocol version. * * @api public */ exports.protocol = parser.protocol; /** * `connect`. * * @param {String} uri * @api public */ exports.connect = lookup; /** * Expose constructors for standalone build. * * @api public */ exports.Manager = require('./manager'); exports.Socket = require('./socket');
Save
cmd:
run