I have got a very basic example. This question has been asked previously multiple times in stack overflow itself but I could not get the right answer so I am going with this
For the Client Side you can use socket.once() instead of socket.on() Ex -
socket.once('result', function(data){ console.log('The data is '+data) })