(request: {})
| 503 | } |
| 504 | |
| 505 | _enqueueRequest (request: {}): number { |
| 506 | const ticket = this._drawNewTicket() |
| 507 | const requestMap = this._requestMap |
| 508 | console.debug('_enqueueRequest: ', { requestMap }) |
| 509 | this._requestMap.set(ticket, { request }) |
| 510 | if (this._requestMap.size === 1) { |
| 511 | // there are no other pending requests |
| 512 | // let's send this one on the wire |
| 513 | this._sendNextRequest() |
| 514 | } |
| 515 | return ticket |
| 516 | } |
| 517 | |
| 518 | /** |
| 519 | Send next pending request to remote peer. |
no test coverage detected