diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-01-02 01:13:56 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-01-03 15:51:05 -0800 |
commit | 94f8368cf9e5077050525e32a24188402f077074 (patch) | |
tree | d9b014c77094dc5d13bc7b42cda1d93fa3c2703d /lib/https.js | |
parent | e4dd5cd6fd7b44f4fc21a5cfd39615a7a5833957 (diff) | |
download | nodejs-94f8368cf9e5077050525e32a24188402f077074.tar.gz nodejs-94f8368cf9e5077050525e32a24188402f077074.tar.bz2 nodejs-94f8368cf9e5077050525e32a24188402f077074.zip |
First pass at new https server
Diffstat (limited to 'lib/https.js')
-rw-r--r-- | lib/https.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/https.js b/lib/https.js new file mode 100644 index 000000000..c3e17a360 --- /dev/null +++ b/lib/https.js @@ -0,0 +1,22 @@ +var tls = require('tls'); +var http = require('http'); +var inherits = require('util').inherits; + + +function Server(opts, requestListener) { + if (!(this instanceof Server)) return new Server(opts, requestListener); + tls.Server.call(this, opts, http._connectionListener); + + if (requestListener) { + this.addListener('request', requestListener); + } +} +inherits(Server, tls.Server); + + +exports.Server = Server; + + +exports.createServer = function(opts, requestListener) { + return new Server(opts, requestListener); +}; |