mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-24 01:14:25 +01:00
try with sendmmsg merged back
This commit is contained in:
@@ -140,6 +140,17 @@ func (u *StdConn) WriteTo(b []byte, ap netip.AddrPort) error {
|
||||
}
|
||||
}
|
||||
|
||||
func (u *StdConn) WriteBatch(pkts []BatchPacket) (int, error) {
|
||||
sent := 0
|
||||
for _, pkt := range pkts {
|
||||
if err := u.WriteTo(pkt.Payload, pkt.Addr); err != nil {
|
||||
return sent, err
|
||||
}
|
||||
sent++
|
||||
}
|
||||
return sent, nil
|
||||
}
|
||||
|
||||
func (u *StdConn) LocalAddr() (netip.AddrPort, error) {
|
||||
a := u.UDPConn.LocalAddr()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user