(seq: number)
| 260 | |
| 261 | // seq for each ack call must be larger than the previous one, otherwise the ack will be ignored |
| 262 | ack(seq: number) { |
| 263 | if (seq < this.seq) |
| 264 | return; |
| 265 | let pop_count = seq - this.seq + 1; |
| 266 | this.queue = this.queue.slice(pop_count); |
| 267 | this.seq = seq + 1; |
| 268 | } |
| 269 | |
| 270 | stop() { |
| 271 | this._stop = true; |