mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-08-22 18:22:37 +00:00
29 lines
498 B
Go
29 lines
498 B
Go
package constant
|
|
|
|
import "net"
|
|
|
|
type Listener interface {
|
|
RawAddress() string
|
|
Address() string
|
|
Close() error
|
|
}
|
|
|
|
type MultiAddrListener interface {
|
|
Close() error
|
|
Config() string
|
|
AddrList() (addrList []net.Addr)
|
|
}
|
|
|
|
type InboundListener interface {
|
|
Name() string
|
|
Listen(tcpIn chan<- ConnContext, udpIn chan<- PacketAdapter) error
|
|
Close() error
|
|
Address() string
|
|
RawAddress() string
|
|
Config() InboundConfig
|
|
}
|
|
|
|
type InboundConfig interface {
|
|
Name() string
|
|
Equal(config InboundConfig) bool
|
|
}
|