Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed issue with stream emitting data to all multiplex #12

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
@@ -1,3 +1,7 @@
Fork Information
===================
This is a fork of the websocket multiplex library with changes to how stream is implemented.

WebSocket-multiplex
===================

Expand Down
4 changes: 3 additions & 1 deletion multiplex_server.js
@@ -1,6 +1,8 @@
var events = require('events');
var stream = require('stream');

var util = require('util');


exports.MultiplexServer = MultiplexServer = function(service) {
var that = this;
Expand Down Expand Up @@ -57,7 +59,7 @@ var Channel = function(conn, topic, channels) {
this.channels = channels;
stream.Stream.call(this);
};
Channel.prototype = new stream.Stream();
util.inherits(Channel, stream.Stream);

Channel.prototype.write = function(data) {
this.conn.write('msg,' + this.topic + ',' + data);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -4,10 +4,10 @@
"version" : "0.1.0",
"description" : "WebSocket-multiplex is a thin library on top of SockJS that allows you to do multiplexing of many virtual WebSockets connection over a single physical one.",
"keywords" : ["websockets", "websocket", "sockjs", "multiplex", "multiplexing"],
"homepage" : "https://github.com/sockjs/websocket-multiplex",
"homepage" : "https://github.com/omairqadir/websocket-multiplex",

"repository": {"type": "git",
"url": "https://github.com/sockjs/websocket-multiplex.git"},
"url": "https://github.com/omairqadir/websocket-multiplex.git"},
"dependencies": {
"sockjs" : "*"
},
Expand Down