DrainTxLimited is like DrainTx but emits at most maxFrames frames in one call (0 means unlimited). Remaining bytes stay queued for later polls.
(maxPayload, maxFrames int)
| 274 | // DrainTxLimited is like DrainTx but emits at most maxFrames frames in one |
| 275 | // call (0 means unlimited). Remaining bytes stay queued for later polls. |
| 276 | func (s *Session) DrainTxLimited(maxPayload, maxFrames int) []*frame.Frame { |
| 277 | frames, _ := s.drainTx(maxPayload, maxFrames, false) |
| 278 | return frames |
| 279 | } |
| 280 | |
| 281 | // DrainTxLimitedTxn is like DrainTxLimited but also returns a snapshot of the |
| 282 | // pre-drain state. If the caller cannot transmit the returned frames (HTTP |