NestJS supports real-time, bidirectional communication via WebSocket gateways — classes decorated with @WebSocketGateway() that handle WebSocket connections and messages (typically over Socket.IO). They enable features like chat, live notifications, and live dashboards, using the same NestJS structure (DI, decorators).
Defining a gateway
{ , , , } ;
{ } ;
({ : })
{
()
: ;
()
() {
..(, data);
}
}
