chore: better packet deadline

This commit is contained in:
wwqgtxx
2023-05-19 23:29:43 +08:00
parent ae8d42fb82
commit 2b1e69153b
6 changed files with 222 additions and 71 deletions

View File

@ -6,9 +6,13 @@ import (
"github.com/Dreamacro/clash/common/pool"
)
type WaitReadFrom interface {
WaitReadFrom() (data []byte, put func(), addr net.Addr, err error)
}
type EnhancePacketConn interface {
net.PacketConn
WaitReadFrom() (data []byte, put func(), addr net.Addr, err error)
WaitReadFrom
}
func NewEnhancePacketConn(pc net.PacketConn) EnhancePacketConn {