(count)
| 121 | this.transport.write(Uint8Array.of(value).buffer); |
| 122 | } |
| 123 | onReadable(count) { |
| 124 | let length = this.buffer.length; |
| 125 | let buffer = new Uint8Array(length + count); |
| 126 | buffer.set(this.buffer); |
| 127 | buffer.set(new Uint8Array(this.read(count)), length); |
| 128 | let position = this.onReceive(buffer, 0); |
| 129 | this.buffer = buffer.slice(position); |
| 130 | } |
| 131 | onReceive(bytes, position) { |
| 132 | while (position < bytes.length) { |
| 133 | const available = bytes.length - position; |