drop in a logger

This commit is contained in:
JackDoan
2026-05-11 17:10:05 -05:00
parent 2a47b47853
commit 0ff28504d7
6 changed files with 65 additions and 53 deletions

View File

@@ -22,13 +22,14 @@ type SendBatch struct {
backing []byte
}
func NewSendBatch(out batchWriter, batchCap, slotCap int) *SendBatch {
// NewSendBatch makes a SendBatch with batchCap slots and an arenaSize byte buffer for slices to back those slots
func NewSendBatch(out batchWriter, batchCap, arenaSize int) *SendBatch {
return &SendBatch{
out: out,
bufs: make([][]byte, 0, batchCap),
dsts: make([]netip.AddrPort, 0, batchCap),
ecns: make([]byte, 0, batchCap),
backing: make([]byte, 0, batchCap*slotCap),
backing: make([]byte, 0, arenaSize),
}
}