mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
[docs] Add explicit documentation for websocket transport (#1128)
This commit is contained in:
committed by
Damien Arrachequesne
parent
c0da119e55
commit
83fedf598a
@@ -177,7 +177,7 @@ socket.on('reconnect_attempt', () => {
|
||||
|
||||
##### With `extraHeaders`
|
||||
|
||||
Note: will only work if `polling` transport is enabled (which is the default)
|
||||
This only works if `polling` transport is enabled (which is the default). Custom headers will not be appended when using `websocket` as the transport. This happens because the WebSocket handshake does not honor custom headers. (For background see the [WebSocket protocol RFC](https://tools.ietf.org/html/rfc6455#section-4))
|
||||
|
||||
```js
|
||||
const socket = io({
|
||||
|
||||
Reference in New Issue
Block a user