sing/common/network/direct.go
2023-04-25 20:27:20 +08:00

22 lines
478 B
Go

package network
import (
"github.com/sagernet/sing/common/buf"
M "github.com/sagernet/sing/common/metadata"
)
type ReadWaiter interface {
WaitReadBuffer(newBuffer func() *buf.Buffer) error
}
type ReadWaitCreator interface {
CreateReadWaiter() (ReadWaiter, bool)
}
type PacketReadWaiter interface {
WaitReadPacket(newBuffer func() *buf.Buffer) (destination M.Socksaddr, err error)
}
type PacketReadWaitCreator interface {
CreateReadWaiter() (PacketReadWaiter, bool)
}