how to get socket id in socket.io code example
Example: get client id socket io
// NodeJs
// Socket.io get id client connected
io.on('connection', (socket) => {
console.log(socket.id) // This is ID session the client
});
// NodeJs
// Socket.io get id client connected
io.on('connection', (socket) => {
console.log(socket.id) // This is ID session the client
});