Permalink
Browse files

Removed channel names. Giving a channel a name is an application deta…

…il, it has nothing to do with the actual channel.
  • Loading branch information...
1 parent 6936672 commit 022dc2267330f1bfa3f8fb0d08bf7f21626844e2 @scottgonzalez committed Apr 9, 2010
Showing with 5 additions and 6 deletions.
  1. +3 −4 lib/channel.js
  2. +2 −2 lib/server.js
View
@@ -1,11 +1,10 @@
var sys = require("sys"),
Session = require("./session").Session;
-function Channel(name, options) {
- // TODO: handle invalid name and/or basePath
+function Channel(options) {
+ // TODO: handle invalid options
options = options || {};
- this.name = name;
- this.basePath = options.basePath || ("/" + name);
+ this.basePath = options.basePath;
this.messageBacklog = options.messageBacklog || 200;
this.sessionTimeout = (options.sessionTimeout || 60) * 1000;
View
@@ -20,10 +20,10 @@ process.mixin(Server.prototype, {
this.httpServer.get(path, handler);
},
- addChannel: function(name, options) {
+ addChannel: function(options) {
// TODO: handle invalid channel
var httpServer = this.httpServer,
- channel = new Channel(name, options);
+ channel = new Channel(options);
this.channels.push(channel);
handlers.forEach(function(handler) {

0 comments on commit 022dc22

Please sign in to comment.