Skip to content
Myr

Mirror nodes server.listen() params [#111]

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Consistency and adds backlog param

authored by visionmedia · committed by visionmedia · parent 81ab164 · Browse files · 2 files+18 added−12 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+18 added−12 removed

  • other:+18 added−12 removed

2 files+18 added−12 removed

modified:lib/express/core.js+14 added-6 removed
178 unmodified lines
179 180 port: 3000,181 182 /**183 * Default host ip.183 * Default host ip, when null node will accept requests on 184 * all network addresses.185 */186 187 host: 'localhost',188 189 /**189 * Run Express at _host_ and _port_, otherwise190 * falling back on the defaults.190 * Maximum number of queued connections.191 */192 193 backlog: 128,194 195 /**196 * Run Express.197 *198 * - Buffers request bodies199 * - Calls #route() once the request is complete200 *195 * @param {string} host201 * @param {int} port202 * @param {string} host203 * @param {int} backlog204 * @see run()205 * @api private206 */207 201 run: function(host, port){208 run: function(port, host, backlog){209 var self = this210 if (host !== undefined) this.host = host211 if (port !== undefined) this.port = port212 if (backlog !== undefined) this.backlog = backlog213 require('http')214 .createServer(function(request, response){215 request.body = ''216 request.setBodyEncoding('utf8')217 request.addListener('body', function(chunk){ request.body += chunk })218 request.addListener('complete', function(){ self.route(request, response) })219 })212 .listen(this.port, this.host)220 .listen(this.port, this.host, this.backlog)221 puts('Express started at http://' + this.host + ':' + this.port + '/ in ' + Express.environment + ' mode')222 },223 224 /**
54 unmodified lines
modified:lib/express/dsl.js+4 added-6 removed