argyle
Advanced tools
Comparing version 0.0.1 to 0.0.2
16
index.js
@@ -8,10 +8,14 @@ /*jshint laxcomma:true asi:true */ | ||
module.exports = function(port, host, debug) { | ||
module.exports = function(port, host, backlog, debug) { | ||
if(!port) port = 8080 | ||
if(!host) host = '127.0.0.1' | ||
if(typeof backlog === 'boolean') { | ||
debug = backlog | ||
backlog = undefined | ||
} | ||
return new Argyle(port, host, debug) | ||
return new Argyle(port, host, backlog, debug) | ||
} | ||
function Argyle(port, host, debug) { | ||
function Argyle(port, host, backlog, debug) { | ||
Argyle.super_.call(this) | ||
@@ -31,3 +35,7 @@ var self = this | ||
this.serverSock.listen(port, host) | ||
if(backlog) { | ||
this.serverSock.listen(port, host, backlog) | ||
} else { | ||
this.serverSock.listen(port, host) | ||
} | ||
} | ||
@@ -34,0 +42,0 @@ util.inherits(Argyle, EventEmitter); |
@@ -5,3 +5,3 @@ { | ||
"description": "Basic SOCKS5 server libary", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -24,6 +24,6 @@ #argyle | ||
###Example: Throttled proxy server using node-throttled-stream | ||
###Example: Throttled proxy server using [node-throttled-stream](https://github.com/tec27/node-throttled-stream) | ||
```javascript | ||
var argyle = require('argyle'), | ||
throttle = require('./throttled-stream'), | ||
throttle = require('throttled-stream'), | ||
kbpsUp = 32, | ||
@@ -30,0 +30,0 @@ kbpsDown = 128; |
10627
166