Modifying this so it moves buffers into string.

This commit is contained in:
Alexander Blair
2017-03-05 16:00:35 -08:00
parent c9b0869e2c
commit a34e8c6ceb
3 changed files with 38 additions and 21 deletions
+19
View File
@@ -0,0 +1,19 @@
<html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.3/socket.io.min.js"></script>
<script>
// set-up a connection between the client and the server
var socket = io.connect('http://ftb-infinity.snipanet.com:8001/');
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "pool_stats";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
socket.on('message', function(data) {
console.log('Incoming message:', data);
});
</script>
</html>