Skip to content

Commit

Permalink
Commit rauchg#10: Comment out unwanted socket.io messages
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSachinSBhat committed Feb 9, 2017
1 parent 1bd6b2d commit d1de18f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ listener.sockets.on('connection', function (socket) {

//global.testContext = global.testContext + 1;

socket.emit('message', { 'message': 'hello world'});
//socket.emit('message', { 'message': 'hello world'});

socket.emit('deviceSessionData', { 'deviceSessionId': deviceSessionId });

Expand All @@ -68,22 +68,22 @@ listener.sockets.on('connection', function (socket) {
/* Remove the location data from the deviceLocationData array */
deviceLocationData.splice(deviceSessionId, 1);

// TODO: Convert this into a method - broadcastBusLocationData(socket)
socket.broadcast.emit('buslocationData', {
'deviceLocationData': global.deviceLocationData
});
//// TODO: Convert this into a method - broadcastBusLocationData(socket)
//socket.broadcast.emit('buslocationData', {
// 'deviceLocationData': global.deviceLocationData
//});
});

socket.on('buslocation', function (busLocation) {
//socket.on('buslocation', function (busLocation) {

global.deviceLocationData[busLocation.deviceSessionId] = { 'deviceSessionId': busLocation.deviceSessionId, 'lat': busLocation.lat, 'lng': busLocation.lng };
// global.deviceLocationData[busLocation.deviceSessionId] = { 'deviceSessionId': busLocation.deviceSessionId, 'lat': busLocation.lat, 'lng': busLocation.lng };

// TODO: Convert this into a method - broadcastBusLocationData(socket)
socket.broadcast.emit('buslocationData', {
//'deviceSessionId': busLocation.deviceSessionId, 'lat': busLocation.lat, 'lng': busLocation.lng,
'deviceLocationData': global.deviceLocationData
});
});
// // TODO: Convert this into a method - broadcastBusLocationData(socket)
// socket.broadcast.emit('buslocationData', {
// //'deviceSessionId': busLocation.deviceSessionId, 'lat': busLocation.lat, 'lng': busLocation.lng,
// 'deviceLocationData': global.deviceLocationData
// });
//});

socket.on('chat message', function(msg){
socket.emit('chat message', msg);
Expand Down

0 comments on commit d1de18f

Please sign in to comment.