decrypt in place

This commit is contained in:
JackDoan
2026-07-15 09:16:40 -05:00
parent c6ebe71c08
commit ef0e3015f9
16 changed files with 183 additions and 263 deletions
+3 -1
View File
@@ -187,8 +187,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()
}
}
}