Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Testing websocket...

  • Loading branch information...
commit b5318a232a540937ae00fb0b220601c6bfc802d7 1 parent c842a16
@DanBUK authored
Showing with 2 additions and 9 deletions.
  1. +2 −9 irc.js
View
11 irc.js
@@ -17,23 +17,16 @@ app.listen(process.ENV['app_port'], process.ENV['app_host']);
var socket = io.listen(app, {
flashPolicyServer: false,
- transports: ['htmlfile', 'xhr-multipart', 'xhr-polling', 'jsonp-polling']
+ transports: ['websocket', 'htmlfile', 'xhr-multipart', 'xhr-polling', 'jsonp-polling']
});
socket.on('connection', function(client) {
-/* var my_timer;
- var my_client = client;
- my_timer = setInterval(function () {
- my_client.send(JSON.stringify({ timestamp: (new Date()).getTime() }));
- }, 1000);
-*/
client.on('message', function(data) {
console.log(data);
});
client.on('disconnect', function() {
- clearTimeout(my_timer);
- console.log('disconnect');
+
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.