Currently, i have the below code that prints the client details. But, it is printing multiple times whenever the data comes via secure connection. I need to print it for a new connection. Please help.
app.on('secureConnection', function (socket) {
if(socket.authorized)
console.log("***Connection status: SUCCESS. From - " + socket.remoteAddress +":" + socket.remotePort)
else
console.log("***Connection status: FAILED. From - " + socket.remoteAddress +":" + socket.remotePort + ". Reason: " + socket.authorizationError)
})