get client id socket io

JavaScript
// NodeJs 
// Socket.io get id client connected
io.on('connection', (socket) => {
	console.log(socket.id) // This is ID session the client
});  
Source

Also in JavaScript: