Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In docs remove Object as a data type for send #2077

Merged
merged 1 commit into from
Sep 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion doc/ws.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,9 @@ only removes listeners added with
### websocket.send(data[, options][, callback])

- `data` {Array|Number|Object|String|ArrayBuffer|Buffer|DataView|TypedArray} The
data to send.
data to send. `Object` values are only supported if they conform to the
requirements of [`Buffer.from()`][]. If those constraints are not met, a
`TypeError` is thrown.
- `options` {Object}
- `binary` {Boolean} Specifies whether `data` should be sent as a binary or
not. Default is autodetected.
Expand Down Expand Up @@ -656,6 +658,8 @@ as configured by the `maxPayload` option.
[concurrency-limit]: https://github.com/websockets/ws/issues/1202
[duplex-options]:
https://nodejs.org/api/stream.html#stream_new_stream_duplex_options
[`buffer.from()`]:
https://nodejs.org/api/buffer.html#static-method-bufferfromobject-offsetorencoding-length
[`http.request()`]:
https://nodejs.org/api/http.html#http_http_request_options_callback
[`https.request()`]:
Expand Down