Skip to content
Browse files

Started working on Node's http.js implementation for jetpack-io

  • Loading branch information...
1 parent 3f2c734 commit 0809bf53bfabdfb31769775f96fc9032a405a542 @kandelakig committed Apr 13, 2012
Showing with 23 additions and 0 deletions.
  1. +23 −0 http.js
View
23 http.js
@@ -0,0 +1,23 @@
+const net = require("./net");
+
+function connectionListener(socket) {
+ throw Error('Not yet implemented');
+}
+exports._connectionListener = connectionListener;
+
+const Server = net.Server.extend({
+ constructor: function Server(requestListener) {
+ if (!(this instanceof Server)) return new Server(requestListener);
+ }
+ net.Server.call(this, {}, connectionListener);
+
+ if (requestListener) {
+ this.addListener('request', requestListener);
+ }
+});
+exports.Server = Server;
+
+function createServer(requestListener) {
+ return new Server(requestListener);
+};
+exports.createServer = createServer;

0 comments on commit 0809bf5

Please sign in to comment.
Something went wrong with that request. Please try again.