Socket.IO

14年前
Socket.IO aims to make realtime apps possible in every browser and mobile device, blurring the differences between the different transport mechanisms. The client side API looks like this:

var socket = new io.Socket(); 
socket.on('connect', function(){
socket.send('hi!');
})
socket.on('message', function(data){
alert(data);
})
socket.on('disconnect', function(){})