NestJS WebSocket gateways के माध्यम से real-time, bidirectional communication का समर्थन करता है — @WebSocketGateway() से decorated classes जो WebSocket connections और messages को handle करती हैं (आमतौर पर Socket.IO के ऊपर)। ये chat, live notifications, और live dashboards जैसे features को सक्षम करती हैं, उसी NestJS structure (DI, decorators) का उपयोग करते हुए।
एक gateway define करना
{ , , , } ;
{ } ;
({ : })
{
()
: ;
()
() {
..(, data);
}
}
