Permalink
Browse files

use latest socket.io version and correct minification

  • Loading branch information...
1 parent 170df58 commit 126be1349d5a2a29d0fedd5ffac398639d0d66d4 @crahles crahles committed Nov 13, 2011
Showing with 7 additions and 6 deletions.
  1. +4 −1 lib/server.js
  2. +1 −1 public/index.html
  3. +2 −2 public/js/main.js
  4. +0 −2 public/js/socket.io.min.js
View
@@ -35,7 +35,10 @@ exports.run = function(httpPort, udpPort, options) {
.use(connect.static(__dirname + '/../public'));
var socket = io.listen(httpServer);
- socket.on('connection', function(client){
+ socket.enable('browser client minification');
+ socket.set('log level', 1); // reduce logging
+
+ socket.sockets.on('connection', function(client){
connected_clients.push(client)
});
View
@@ -7,7 +7,7 @@
<script src="js/jquery.ui.custom.min.js"></script>
<script src="js/jquery.getUrlParam.js"></script>
<script src="js/jquery.flot.min.js"></script>
- <script src="js/socket.io.min.js"></script>
+ <script src="/socket.io/socket.io.js"></script>
<script src="js/main.js"></script>
<script src="js/pimp.js"></script>
</head>
View
@@ -62,10 +62,10 @@ var Healthety = function(){
minime.getSocket = function(){ return socket; };
function connect(){
- socket = new io.Socket(
+ socket = io.connect(
window.location.host.split(":")[0], {'port': window.location.port}
);
- socket.connect();
+ //socket.connect();
return socket;
}
Oops, something went wrong.

0 comments on commit 126be13

Please sign in to comment.