MCPcopy Create free account
hub / github.com/Hidden-Node/GooseRelayVPN-AndroidClient / DrainTxLimited

Method DrainTxLimited

internal/session/session.go:276–279  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
276func (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

Calls 1

drainTxMethod · 0.95