mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-04 20:37:40 +03:00
22 lines
478 B
Go
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)
|
|
}
|