use SPDY
authorJack Allnutt <jack@allnutt.eu>
Sun, 7 Jul 2013 00:49:17 +0000 (01:49 +0100)
committerJack Allnutt <jack@allnutt.eu>
Sun, 7 Jul 2013 00:49:17 +0000 (01:49 +0100)
package.json
server/weblistener.js

index b20a822f8354e1ea2a6429e34b084f8a12d9592f..59125289fa9e37e895180e780aa2ff5bdc6b8df9 100644 (file)
@@ -22,6 +22,7 @@
     "eventemitter2": "0.4.11",\r
     "ipaddr.js": "0.1.1",\r
     "socksjs": "0.3.3",\r
-    "iconv-lite" : "0.2.10"\r
+    "iconv-lite" : "0.2.10",\r
+    "spdy": "1.9.1"\r
   }\r
 }\r
index 651d1f69ff424483f3e12e09c99f098b317bc3c3..a8b785041177ddd315ef89203f2e3d05ad1acbaf 100644 (file)
@@ -7,6 +7,7 @@ var ws          = require('socket.io'),
     dns         = require('dns'),
     url         = require('url'),
     _           = require('lodash'),
+    spdy        = require('spdy'),
     Client      = require('./client.js').Client,
     HttpHandler = require('./httphandler.js').HttpHandler,
     rehash      = require('./rehash.js'),
@@ -57,8 +58,8 @@ var WebListener = function (web_config, transports) {
             }
         }
 
-        hs = https.createServer(opts, handleHttpRequest);
-        
+        hs = spdy.createServer(opts, handleHttpRequest);
+
         // Start socket.io listening on this weblistener
         this.ws = ws.listen(hs, _.extend({ssl: true}, ws_opts));
         hs.listen(web_config.port, web_config.address, function () {