You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
602 B

var socket = io();
/*Initializing the connection with the server via websockets */
socket.emit('liveMessage', "true");
socket.on("jsonHoneycomb",function(message){
/*
When server sends data to the client it will trigger "message" event on the client side , by
using socket.on("message") , one cna listen for the ,message event and associate a callback to
be executed . The Callback function gets the dat sent from the server
*/
console.log("Message from the server arrived")
prePopulate(message);
socket.emit('ackMessage', "true");
});