Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: websockets/ws
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8.15.0
Choose a base ref
...
head repository: websockets/ws
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8.15.1
Choose a head ref
  • 3 commits
  • 6 files changed
  • 1 contributor

Commits on Dec 12, 2023

  1. [fix] Emit the event when the microtask is executed

    Emit the `'message'`, `'ping'`, and `'pong'` event when the microtask
    for that event is executed.
    lpinca committed Dec 12, 2023
    Copy the full SHA
    fccc580 View commit details
  2. [major] Rename the allowMultipleEventsPerMicrotask option

    Rename the `allowMultipleEventsPerMicrotask` option to
    `allowSynchronousEvents`.
    lpinca committed Dec 12, 2023
    Copy the full SHA
    4ed7fe5 View commit details
  3. [dist] 8.15.1

    lpinca committed Dec 12, 2023
    Copy the full SHA
    a57e963 View commit details
Showing with 229 additions and 172 deletions.
  1. +8 −8 doc/ws.md
  2. +202 −144 lib/receiver.js
  3. +5 −6 lib/websocket-server.js
  4. +9 −9 lib/websocket.js
  5. +1 −1 package.json
  6. +4 −4 test/receiver.test.js
16 changes: 8 additions & 8 deletions doc/ws.md
Original file line number Diff line number Diff line change
@@ -72,10 +72,10 @@ This class represents a WebSocket server. It extends the `EventEmitter`.
### new WebSocketServer(options[, callback])

- `options` {Object}
- `allowMultipleEventsPerMicrotask` {Boolean} Specifies whether or not to
process more than one of the `'message'`, `'ping'`, and `'pong'` events per
microtask. To improve compatibility with the WHATWG standard, the default
value is `false`. Setting it to `true` improves performance slightly.
- `allowSynchronousEvents` {Boolean} Specifies whether any of the `'message'`,
`'ping'`, and `'pong'` events can be emitted multiple times in the same
tick. To improve compatibility with the WHATWG standard, the default value
is `false`. Setting it to `true` improves performance slightly.
- `backlog` {Number} The maximum length of the queue of pending connections.
- `clientTracking` {Boolean} Specifies whether or not to track clients.
- `handleProtocols` {Function} A function which can be used to handle the
@@ -296,10 +296,10 @@ This class represents a WebSocket. It extends the `EventEmitter`.
- `address` {String|url.URL} The URL to which to connect.
- `protocols` {String|Array} The list of subprotocols.
- `options` {Object}
- `allowMultipleEventsPerMicrotask` {Boolean} Specifies whether or not to
process more than one of the `'message'`, `'ping'`, and `'pong'` events per
microtask. To improve compatibility with the WHATWG standard, the default
value is `false`. Setting it to `true` improves performance slightly.
- `allowSynchronousEvents` {Boolean} Specifies whether any of the `'message'`,
`'ping'`, and `'pong'` events can be emitted multiple times in the same
tick. To improve compatibility with the WHATWG standard, the default value
is `false`. Setting it to `true` improves performance slightly.
- `finishRequest` {Function} A function which can be used to customize the
headers of each http request before it is sent. See description below.
- `followRedirects` {Boolean} Whether or not to follow redirects. Defaults to
Loading