Comparing version 0.4.0 to 0.4.1
@@ -31,16 +31,1 @@ #!/usr/bin/env node | ||
}); | ||
// Clients who connect get an instance of this session object: | ||
function Session (params) { | ||
var conn = params.connection; | ||
var user = params.user; | ||
var client = params.client; | ||
conn.addListener('end', function () { | ||
sys.puts('User ' + sys.inspect(user) + ' disconnected'); | ||
}); | ||
this.quote = function (f) { | ||
f(quotes[Math.random() * quotes.length]); | ||
}; | ||
} |
@@ -5,5 +5,5 @@ var net = require('net'); | ||
var Hash = require('traverse/hash'); | ||
var recon = require('recon'); | ||
var http = require('http'); | ||
var connect = require('connect'); | ||
var io = require('socket.io'); | ||
@@ -28,3 +28,8 @@ | ||
if (params.port) { | ||
stream = net.createConnection(params.port, params.host); | ||
if (params.reconnect) { | ||
stream = recon(params); | ||
} | ||
else { | ||
stream = net.createConnection(params.port, params.host); | ||
} | ||
stream.remoteAddress = params.host || '127.0.0.1'; | ||
@@ -38,4 +43,5 @@ stream.remotePort = params.port; | ||
self.end = function () { | ||
stream.close(); | ||
stream.end(); | ||
self.emit('end'); | ||
return self; | ||
}; | ||
@@ -88,2 +94,3 @@ | ||
self.emit('error', '.end() is not defined for this action'); | ||
return self; | ||
}; | ||
@@ -235,2 +242,5 @@ | ||
} | ||
else if (typeof arg === 'undefined') { | ||
// ignore | ||
} | ||
else { | ||
@@ -237,0 +247,0 @@ throw new Error('Not sure what to do about ' |
{ | ||
"name" : "dnode", | ||
"version" : "0.4.0", | ||
"version" : "0.4.1", | ||
"description" : "Transparently call remote callbacks", | ||
@@ -27,5 +27,5 @@ "modules" : { | ||
"traverse" : ">=0.0.8", | ||
"connect" : ">=0.2.0" | ||
"recon" : ">=0.0.5" | ||
}, | ||
"engine" : ["node >=0.2.0"] | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104657
59
2312
345
+ Addedrecon@>=0.0.5
+ Addedrecon@0.0.8(transitive)
- Removedconnect@>=0.2.0
- Removedconnect@3.7.0(transitive)
- Removeddebug@2.6.9(transitive)
- Removedee-first@1.1.1(transitive)
- Removedencodeurl@1.0.2(transitive)
- Removedescape-html@1.0.3(transitive)
- Removedfinalhandler@1.1.2(transitive)
- Removedms@2.0.0(transitive)
- Removedon-finished@2.3.0(transitive)
- Removedparseurl@1.3.3(transitive)
- Removedstatuses@1.5.0(transitive)
- Removedunpipe@1.0.0(transitive)
- Removedutils-merge@1.0.1(transitive)