decrypt in place

This commit is contained in:
JackDoan
2026-07-15 09:16:40 -05:00
parent 41daff6538
commit f2b04d2e9d
15 changed files with 171 additions and 267 deletions
+3 -1
View File
@@ -173,8 +173,10 @@ func (u *TesterConn) ListenOut(r EncReader, flush func()) error {
return os.ErrClosed
case p := <-u.RxPackets:
r(p.From, p.Data, RxMeta{})
p.Release()
// The batcher borrows plaintext decrypted in place inside p.Data
// until Flush, so the packet must stay alive across flush()
flush()
p.Release()
}
}
}