why does it work

This commit is contained in:
JackDoan
2025-11-11 19:02:16 -06:00
parent 400fdace9d
commit 17a6917428
6 changed files with 251 additions and 9 deletions

View File

@@ -80,3 +80,13 @@ func (u *StdConn) PrepareRawMessages(n int, isV4 bool) ([]rawMessage, []*packet.
return msgs, packets
}
func setIovecSlice(iov *iovec, b []byte) {
if len(b) == 0 {
iov.Base = nil
iov.Len = 0
return
}
iov.Base = &b[0]
iov.Len = uint64(len(b))
}