try with sendmmsg merged back

This commit is contained in:
Ryan
2025-11-06 10:56:53 -05:00
parent 2c6f81c224
commit c9a695c2bf
10 changed files with 324 additions and 50 deletions

View File

@@ -18,10 +18,16 @@ type Conn interface {
LocalAddr() (netip.AddrPort, error)
ListenOut(r EncReader) error
WriteTo(b []byte, addr netip.AddrPort) error
WriteBatch(pkts []BatchPacket) (int, error)
ReloadConfig(c *config.C)
Close() error
}
type BatchPacket struct {
Payload []byte
Addr netip.AddrPort
}
type NoopConn struct{}
func (NoopConn) Rebind() error {
@@ -36,6 +42,9 @@ func (NoopConn) ListenOut(_ EncReader) error {
func (NoopConn) WriteTo(_ []byte, _ netip.AddrPort) error {
return nil
}
func (NoopConn) WriteBatch(_ []BatchPacket) (int, error) {
return 0, nil
}
func (NoopConn) ReloadConfig(_ *config.C) {
return
}