This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var rpc = module.exports = function() { | |
| events.EventEmitter.call(this); | |
| var self = this; | |
| this.counter = 0; | |
| this.functions = {}; | |
| this.promises = {}; | |
| this.id | |
| this.slaves = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Downloader.prototype.download = function() { | |
| if(this.quota.length >= 1 && !this.isDownloading) { | |
| this.isDownloading = true; | |
| var id = this.quota.shift(); | |
| var httpClient = http.createClient(this.port, this.host); | |
| var request = httpClient.request('GET', '/download/' + this.key + '/' + id, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| events.js:45 | |
| throw arguments[1]; // Unhandled 'error' event | |
| ^ | |
| Error: error parsing url | |
| at Parser.execute (/home/joe/Devel/node_modules/bouncy/node_modules/parsley/index.js:24:27) | |
| at Socket.<anonymous> (/home/joe/Devel/node_modules/bouncy/node_modules/parsley/index.js:11:14) | |
| at Socket.emit (events.js:64:17) | |
| at Socket._onReadable (net.js:672:14) | |
| at IOWatcher.onReadable [as callback] (net.js:177:10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var bouncy = require('bouncy'); | |
| module.exports = function(evn) { | |
| bouncy(function(req, bounce) { | |
| try { | |
| if(evn.domains.hasOwnProperty(req.headers.host)) { | |
| bounce(evn.domains[req.headers.host].port); | |
| } else if(evn.cdn.hosts.hasOwnProperty(req.headers.host)) { | |
| bounce(evn.cdn.hosts[req.headers.host].port); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var utils = require('../lib/util') | |
| var RpcModule = require('../lib/rpc').RpcModule | |
| var events = require('events'); | |
| var util = require('util'); | |
| var net = require('net'); | |
| /*** | |
| * | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var utils = require('./util') | |
| var RpcModule = require('./rpc').RpcModule | |
| var events = require('events'); | |
| var util = require('util'); | |
| var net = require('net'); | |
| var crypto = require('crypto'); | |
| /*** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*** | |
| * Node modules | |
| */ | |
| var events = require('events'); | |
| var util = require('util'); | |
| var fs = require('fs'); | |
| /*** | |
| * Local modules | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var argsKeys = []; | |
| var argsObjs = []; | |
| for(var i = 0; i < locals.length; i++) { | |
| argsKeys.push(locals[i].key); | |
| argsObjs.push(locals[i].object); | |
| }; | |
| argsKeys.push('return (' + block + ')(' + argsKeys.join(',') + ');'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require('fs') | |
| var events = require('events') | |
| var util = require('util') | |
| var path = require('path') | |
| var FsPool = module.exports = function(dir) { | |
| events.EventEmitter.call(this) | |
| this.dir = dir; | |
| this.files = []; | |
| this.active = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*** | |
| * | |
| * | |
| * | |
| */ | |
| var vm = require('vm'); | |
| var events = require('events'); | |
| var util = require('util'); | |
| var fs = require('fs'); | |
| var npm = require('npm'); |