()
| 183 | } |
| 184 | |
| 185 | readString(): string { |
| 186 | const len = this.readU32(); |
| 187 | const bytes = new Uint8Array(this.view.buffer, this.cursor, len); |
| 188 | this.cursor += len; |
| 189 | return this.stringDecoder.decode(bytes); |
| 190 | } |
| 191 | |
| 192 | readEvent(): Event | null { |
| 193 | if (this.cursor >= this.view.byteLength) return null; |