Created
May 18, 2011 14:20
-
-
Save sh1mmer/978658 to your computer and use it in GitHub Desktop.
Request Skeleton
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Server CommonJS Module Skeleton | |
var sys = require('sys'), | |
EE = require('events').EventEmitter; | |
var Server = exports.Server = function() { | |
//Server Setup | |
}; | |
sys.inherits(Server, EE); | |
Server.prototype.Request = function() { | |
//Request Setup | |
}; | |
sys.inherits(Sever.prototype.Request, EE); | |
Server.prototype._createRequest = function(in, out) { | |
//Request Factory | |
return new this.Request(); | |
}; | |
exports.createServer = function() { | |
//Server Factory | |
return new Server(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment