sing/common/network/thread.go
2022-05-30 12:13:23 +08:00

18 lines
385 B
Go

package network
import (
"github.com/sagernet/sing/common/buf"
M "github.com/sagernet/sing/common/metadata"
)
type ThreadUnsafeWriter interface {
WriteIsThreadUnsafe()
}
type ThreadSafeReader interface {
ReadBufferThreadSafe() (buffer *buf.Buffer, err error)
}
type ThreadSafePacketReader interface {
ReadPacketThreadSafe() (buffer *buf.Buffer, addr M.Socksaddr, err error)
}