chore: decrease shadowsocks udp read memory used for no-windows platform

This commit is contained in:
wwqgtxx
2023-05-11 19:01:41 +08:00
parent e404695a0d
commit 234f7dbd3b
12 changed files with 361 additions and 86 deletions

View File

@ -0,0 +1,15 @@
//go:build windows
package packet
import (
"net"
)
type enhanceUDPConn struct {
*net.UDPConn
}
func (c *enhanceUDPConn) WaitReadFrom() (data []byte, put func(), addr net.Addr, err error) {
return waitReadFrom(c.UDPConn)
}