github.com/kelleygo/clashcore@v1.0.2/constant/listener.go (about)

     1  package constant
     2  
     3  import "net"
     4  
     5  type Listener interface {
     6  	RawAddress() string
     7  	Address() string
     8  	Close() error
     9  }
    10  
    11  type MultiAddrListener interface {
    12  	Close() error
    13  	Config() string
    14  	AddrList() (addrList []net.Addr)
    15  }
    16  
    17  type InboundListener interface {
    18  	Name() string
    19  	Listen(tunnel Tunnel) error
    20  	Close() error
    21  	Address() string
    22  	RawAddress() string
    23  	Config() InboundConfig
    24  }
    25  
    26  type InboundConfig interface {
    27  	Name() string
    28  	Equal(config InboundConfig) bool
    29  }