()
| 76 | } |
| 77 | |
| 78 | #validatePayloadLength () { |
| 79 | if ( |
| 80 | this.#maxPayloadSize > 0 && |
| 81 | !isControlFrame(this.#info.opcode) && |
| 82 | this.#info.payloadLength + this.#fragmentsBytes > this.#maxPayloadSize |
| 83 | ) { |
| 84 | failWebsocketConnection(this.#handler, 1009, 'Payload size exceeds maximum allowed size') |
| 85 | return false |
| 86 | } |
| 87 | |
| 88 | return true |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * Runs whenever a new chunk is received. |
no test coverage detected