Skip to content

Instantly share code, notes, and snippets.

@aaronblohowiak
Created May 18, 2010 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronblohowiak/404695 to your computer and use it in GitHub Desktop.
Save aaronblohowiak/404695 to your computer and use it in GitHub Desktop.
var NodeSession = function(id, params, channels) {
sys.puts(sys.inspect([id, params, channels]));
this.session_id = id;
this.creationParams = params;
this.channels = channels;
this.outboundQueue = [];
var self = this;
this.receiveMessage = function(channel, data) {
self.receiveMessageUnbound(channel, data);
};
return this;
};
NodeSession.prototype = {
receiveMessageUnbound: function(channel, data) {
this.outboundQueue.push({
channel: channel,
data: data,
timestamp: Date.now()
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment