Permalink
Browse files

expose the stream object in .connect()

  • Loading branch information...
1 parent 9ed1c70 commit c8239bc4c0f1b28aa0bd2c260f094301e5b4363f @substack committed Dec 17, 2011
Showing with 4 additions and 3 deletions.
  1. +3 −2 index.js
  2. +1 −1 package.json
View
5 index.js
@@ -14,6 +14,7 @@ function dnode (wrapper) {
this.proto = protocol(wrapper);
this.stack = [];
+ this.streams = [];
return this;
}
@@ -52,7 +53,7 @@ dnode.prototype.connect = function () {
});
}
else {
- attachDnode();
+ attachDnode();
}
stream.remoteAddress = params.host;
@@ -93,7 +94,6 @@ dnode.prototype.connect = function () {
}
function attachDnode() {
-
client = createClient(self.proto, stream);
client.end = function () {
@@ -123,6 +123,7 @@ dnode.prototype.connect = function () {
client.start();
};
+ this.streams.push(stream);
return this;
};
View
2 package.json
@@ -1,6 +1,6 @@
{
"name" : "dnode",
- "version" : "0.9.2",
+ "version" : "0.9.3",
"description" : "freestyle RPC",
"main" : "./index.js",
"keywords" : [

0 comments on commit c8239bc

Please sign in to comment.