Permalink
Browse files

add .end()

  • Loading branch information...
1 parent 4d3e735 commit 2e60d4c878afd5c00fa808dd93991fb886e7fce3 @substack committed Jun 25, 2012
Showing with 6 additions and 1 deletion.
  1. +5 −0 browser.js
  2. +1 −1 package.json
View
5 browser.js
@@ -26,6 +26,11 @@ module.exports = function (uri, cb) {
if (!ready) buffer.push(msg)
else sock.send(msg)
};
+ stream.end = function (msg) {
+ if (msg !== undefined) stream.write(msg);
+ stream.writable = false;
+ sock.close();
+ };
sock.onopen = function () {
if (typeof cb === 'function') cb();
View
2 package.json
@@ -1,6 +1,6 @@
{
"name" : "shoe",
- "version" : "0.0.0",
+ "version" : "0.0.1",
"description" : "streaming sockjs for node and the browser",
"main" : "index.js",
"browserify" : "browser.js",

0 comments on commit 2e60d4c

Please sign in to comment.