* Checks that the new length to read is within the range of the buffer length. Throws a RangeError if not. * @param {Number} newLength
(newLength)
| 154 | * @param {Number} newLength |
| 155 | */ |
| 156 | checkOffset(newLength) { |
| 157 | if (this.offset + newLength > this.buf.length) { |
| 158 | const err = new RangeError('Trying to access beyond buffer length'); |
| 159 | err.expectedLength = newLength; |
| 160 | throw err; |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | /** |
| 165 | * Reads a protocol string list |
no outgoing calls
no test coverage detected