small changes in chat gateway
This commit is contained in:
@@ -3,21 +3,27 @@ import {
|
||||
SubscribeMessage,
|
||||
WebSocketServer,
|
||||
MessageBody,
|
||||
|
||||
OnGatewayConnection,
|
||||
|
||||
OnGatewayDisconnect,
|
||||
} from '@nestjs/websockets';
|
||||
|
||||
@WebSocketGateway(5000, {
|
||||
path: '/chat',
|
||||
})
|
||||
export class ChatGateway implements OnGatewayConnection {
|
||||
|
||||
export class ChatGateway
|
||||
implements OnGatewayConnection, OnGatewayDisconnect
|
||||
{
|
||||
@WebSocketServer()
|
||||
server;
|
||||
|
||||
handleConnection(client) {
|
||||
console.log('------------------------ Client connected:', client.id);
|
||||
console.log('---- Client connected :', client.id);
|
||||
}
|
||||
|
||||
handleDisconnect(client) {
|
||||
console.log('---- client disconnected:', client.id);
|
||||
}
|
||||
/*
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user