mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 12:30:06 +02:00
Update scanner (server)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { Socket } from 'socket.io';
|
||||
|
||||
export const sockets = (socket: Socket) => {
|
||||
socket.broadcast.emit('user:connected', {
|
||||
userID: socket.id,
|
||||
username: socket.handshake.query.username,
|
||||
});
|
||||
|
||||
socket.on('disconnect', () => {
|
||||
socket.broadcast.emit('user:disconnected', {
|
||||
userID: socket.id,
|
||||
username: socket.handshake.query.username,
|
||||
});
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user