mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-04 20:37:40 +03:00
24 lines
572 B
Go
24 lines
572 B
Go
package network
|
|
|
|
import (
|
|
"github.com/sagernet/sing/common/buf"
|
|
M "github.com/sagernet/sing/common/metadata"
|
|
)
|
|
|
|
type ReadWaiter interface {
|
|
InitializeReadWaiter(newBuffer func() *buf.Buffer)
|
|
WaitReadBuffer() (buffer *buf.Buffer, err error)
|
|
}
|
|
|
|
type ReadWaitCreator interface {
|
|
CreateReadWaiter() (ReadWaiter, bool)
|
|
}
|
|
|
|
type PacketReadWaiter interface {
|
|
InitializeReadWaiter(newBuffer func() *buf.Buffer)
|
|
WaitReadPacket() (buffer *buf.Buffer, destination M.Socksaddr, err error)
|
|
}
|
|
|
|
type PacketReadWaitCreator interface {
|
|
CreateReadWaiter() (PacketReadWaiter, bool)
|
|
}
|