MCPcopy Index your code
hub / github.com/nodejs/node / constructor

Method constructor

test/common/websocket-server.js:9–20  ·  view source on GitHub ↗
({
    port = 0,
    server,
    customHandleUpgradeHeaders = [],
  })

Source from the content-addressed store, hash-verified

7
8class WebSocketServer {
9 constructor({
10 port = 0,
11 server,
12 customHandleUpgradeHeaders = [],
13 }) {
14 this.port = port;
15 this.server = server || http.createServer();
16 this.clients = new Set();
17 this.customHandleUpgradeHeaders = customHandleUpgradeHeaders;
18
19 this.server.on('upgrade', this.handleUpgrade.bind(this));
20 }
21
22 start() {
23 return new Promise((resolve) => {

Callers

nothing calls this directly

Calls 2

onMethod · 0.45
bindMethod · 0.45

Tested by

no test coverage detected