Question · NestJS course · Module 5: WebSockets
@WebSocketGateway Configuration Options
What does the transports: ['websocket', 'polling'] option mean in @WebSocketGateway?
Answer options
- Socket.IO supports two transport protocols - WebSocket and HTTP long-polling as a fallback
- The server automatically switches between protocols every minute
- The client must use both transports simultaneously
- Polling replaces WebSocket in production mode
You can check the correct answer by solving this task in the CodeWorlds game.