Skip to content

Commit 738e892

Browse files
Merge pull request #1686 from steinroe/docs/websockets
docs(websockets): Add socket io version warning
2 parents 554bbc4 + 9d5e833 commit 738e892

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/websockets/gateways.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ $ npm i --save-dev @types/socket.io
2020
$ npm i --save @nestjs/websockets @nestjs/platform-socket.io
2121
```
2222

23+
> warning **Warning** `@nestjs/platform-socket.io` currently depends on socket.io v2.3 and socket.io v3.0 client and server are not backward compatible. However, you can still implement a custom adapter to use socket.io v3.0. Please refer to [this issue](https://github.com/nestjs/nest/issues/5676) for further information.
24+
2325
#### Overview
2426

2527
In general, each gateway is listening on the same port as the **HTTP server**, unless your app is not a web application, or you have changed the port manually. This default behavior can be modified by passing an argument to the `@WebSocketGateway(80)` decorator where `80` is a chosen port number. You can also set a [namespace](https://socket.io/docs/rooms-and-namespaces/) used by the gateway using the following construction:

0 commit comments

Comments
 (0)