clash/constant/listener.go

31 lines
546 B
Go
Raw Normal View History

2021-07-31 16:35:37 +00:00
package constant
import "net"
2021-07-31 16:35:37 +00:00
type Listener interface {
RawAddress() string
Address() string
Close() error
}
type AdvanceListener interface {
Close() error
Config() string
AddrList() (addrList []net.Addr)
HandleConn(conn net.Conn, in chan<- ConnContext)
}
2022-12-04 05:37:14 +00:00
2022-12-04 13:53:13 +00:00
type InboundListener interface {
2022-12-04 05:37:14 +00:00
Name() string
2022-12-04 07:15:23 +00:00
Listen(tcpIn chan<- ConnContext, udpIn chan<- PacketAdapter) error
2022-12-04 05:37:14 +00:00
Close() error
Address() string
RawAddress() string
2022-12-04 13:53:13 +00:00
Config() InboundConfig
}
type InboundConfig interface {
Name() string
Equal(config InboundConfig) bool
2022-12-04 05:37:14 +00:00
}