socket io client socket id 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
});