Add AbstractConn interface

This commit is contained in:
世界 2023-05-09 12:51:55 +08:00
parent 8365dd48a1
commit f60c80c56f
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -11,6 +11,15 @@ import (
M "github.com/sagernet/sing/common/metadata"
)
type AbstractConn interface {
Close() error
LocalAddr() net.Addr
RemoteAddr() net.Addr
SetDeadline(t time.Time) error
SetReadDeadline(t time.Time) error
SetWriteDeadline(t time.Time) error
}
type PacketReader interface {
ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)
}