Permalink
Browse files

WebSockets??

  • Loading branch information...
DanBUK committed Feb 7, 2011
1 parent 9f5a8d7 commit 69d3f0caa94d974bfa3a8a5f6021ae49fade932d
Showing with 7 additions and 8 deletions.
  1. +6 −5 public/index.html
  2. +1 −3 socket-demo.js
View
@@ -6,13 +6,14 @@
var sock = null;
var ts = null;
var body_loaded = function () {
- sock = new io.Socket(null, {
- port: 80
+ sock = new io.Socket();
+ // sock = new io.Socket(null, {
+ // port: 80
// ,
// ,transports: ['websocket', 'flashsocket', 'htmlfile', 'xhr-multipart', 'xhr-polling', 'jsonp-polling']
- , transports: ['websocket']
- , rememberTransport: false
- });
+ // , transports: ['websocket']
+ // , rememberTransport: false
+ // });
sock.on('message', handleMessage);
sock.connect();
ts = document.getElementById('timestamp');
View
@@ -16,9 +16,7 @@ app.listen(process.ENV['app_port'], process.ENV['app_host']);
var socket = io.listen(app, {
flashPolicyServer: false,
- // transports: ['websocket', 'flashsocket', 'htmlfile', 'xhr-multipart', 'xhr-polling', 'jsonp-polling']
- // transports: ['websocket', 'flashsocket', 'htmlfile', 'xhr-multipart', 'jsonp-polling']
- transports: ['websocket']
+ transports: ['websocket', 'flashsocket', 'htmlfile', 'xhr-multipart', 'xhr-polling', 'jsonp-polling']
});
socket.on('connection', function(client) {

0 comments on commit 69d3f0c

Please sign in to comment.