NestJS real-time, bidirectional communication ला WebSocket gateways द्वारे समर्थन देते — @WebSocketGateway() decorator सह classes जे WebSocket connections आणि messages हँडल करतात (सामान्यतः Socket.IO वर). ते chat, live notifications, आणि live dashboards सारखी features सक्षम करतात, NestJS च्या समान structure (DI, decorators) वापरून.
Gateway परिभाषित करणे
{ , , , } ;
{ } ;
({ : })
{
()
: ;
()
() {
..(, data);
}
}
