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 6, 2024
1 parent 577ac48 commit 54f78f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/web/websocket/frame.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const { maxUnsigned16Bit } = require('./constants')
const { maxUnsigned16Bit, opcodes } = require('./constants')

const BUFFER_SIZE = 16386

Expand Down Expand Up @@ -116,7 +116,7 @@ class WebsocketFrameSend {
}
const head = Buffer.allocUnsafeSlow(offset)

head[0] = 0x80 /* FIN */ | 0x1 /* opcode TEXT */
head[0] = 0x80 /* FIN */ | opcodes.TEXT /* opcode TEXT */
head[1] = payloadLength | 0x80 /* MASK */
head[offset - 4] = maskKey[0]
head[offset - 3] = maskKey[1]
Expand Down

0 comments on commit 54f78f7

Please sign in to comment.