(code?: number)
| 86 | } |
| 87 | |
| 88 | private join(code?: number): Buffer { |
| 89 | if (code) { |
| 90 | this.buffer[this.headerPosition] = code |
| 91 | //length is everything in this packet minus the code |
| 92 | const length = this.offset - (this.headerPosition + 1) |
| 93 | this.buffer.writeInt32BE(length, this.headerPosition + 1) |
| 94 | } |
| 95 | return this.buffer.slice(code ? 0 : 5, this.offset) |
| 96 | } |
| 97 | |
| 98 | public flush(code?: number): Buffer { |
| 99 | const result = this.join(code) |
no outgoing calls
no test coverage detected