commit
This commit is contained in:
parent
a15c733e45
commit
2a5130cbda
2838 changed files with 288613 additions and 0 deletions
20
node_modules/undici/docs/api/WebSocket.md
generated
vendored
Normal file
20
node_modules/undici/docs/api/WebSocket.md
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Class: WebSocket
|
||||
|
||||
> ⚠️ Warning: the WebSocket API is experimental and has known bugs.
|
||||
|
||||
Extends: [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget)
|
||||
|
||||
The WebSocket object provides a way to manage a WebSocket connection to a server, allowing bidirectional communication. The API follows the [WebSocket spec](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket).
|
||||
|
||||
## `new WebSocket(url[, protocol])`
|
||||
|
||||
Arguments:
|
||||
|
||||
* **url** `URL | string` - The url's protocol *must* be `ws` or `wss`.
|
||||
* **protocol** `string | string[]` (optional) - Subprotocol(s) to request the server use.
|
||||
|
||||
## Read More
|
||||
|
||||
- [MDN - WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket)
|
||||
- [The WebSocket Specification](https://www.rfc-editor.org/rfc/rfc6455)
|
||||
- [The WHATWG WebSocket Specification](https://websockets.spec.whatwg.org/)
|
Loading…
Add table
Add a link
Reference in a new issue