MCPcopy Create free account
hub / github.com/nodejs/node / #run

Method #run

deps/undici/src/lib/web/websocket/sender.js:76–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74 }
75
76 async #run () {
77 this.#running = true
78 const queue = this.#queue
79 while (!queue.isEmpty()) {
80 const node = queue.shift()
81 // wait pending promise
82 if (node.promise !== null) {
83 await node.promise
84 }
85 // write
86 this.#socket.write(node.frame, node.callback)
87 // cleanup
88 node.callback = node.frame = null
89 }
90 this.#running = false
91 }
92}
93
94function createFrame (data, hint) {

Callers 1

addMethod · 0.95

Calls 3

isEmptyMethod · 0.45
shiftMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected