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

Method DrainTx

internal/session/session.go:269–272  ·  view source on GitHub ↗

DrainTx removes pending tx bytes and returns them as a sequence of frames, each capped at maxPayload bytes. Emits a SYN frame first if needed, and a trailing FIN frame if RequestClose was called and the FIN hasn't been sent yet.

(maxPayload int)

Source from the content-addressed store, hash-verified

267// each capped at maxPayload bytes. Emits a SYN frame first if needed, and a
268// trailing FIN frame if RequestClose was called and the FIN hasn't been sent yet.
269func (s *Session) DrainTx(maxPayload int) []*frame.Frame {
270 frames, _ := s.drainTx(maxPayload, 0, false)
271 return frames
272}
273
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.

Calls 1

drainTxMethod · 0.95