Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
9 lines (8 sloc) 256 Bytes
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io.connect('http://localhost:8080');
socket.on('news', function (data) {
document.write(JSON.stringify(data));
socket.emit('my other event', { my: 'data' });
});
</script>