Skip to content

Commit

Permalink
Update frame.js
Browse files Browse the repository at this point in the history
  • Loading branch information
tsctx authored Jul 8, 2024
1 parent 762814c commit 433d3c3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/web/websocket/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@ class WebsocketFrameSend {
}

/**
* @param {string | Uint8Array} body
* @param {Uint8Array} buffer
*/
static createFastTextFrame (body) {
static createFastTextFrame (buffer) {
const maskKey = generateMask()

const buffer = typeof body === 'string' ? Buffer.from(body) : body
const bodyLength = buffer.length

// mask body
Expand Down

0 comments on commit 433d3c3

Please sign in to comment.