github.com/metacubex/mihomo@v1.18.5/constant/context.go (about)

     1  package constant
     2  
     3  import (
     4  	"net"
     5  
     6  	N "github.com/metacubex/mihomo/common/net"
     7  
     8  	"github.com/gofrs/uuid/v5"
     9  )
    10  
    11  type PlainContext interface {
    12  	ID() uuid.UUID
    13  }
    14  
    15  type ConnContext interface {
    16  	PlainContext
    17  	Metadata() *Metadata
    18  	Conn() *N.BufferedConn
    19  }
    20  
    21  type PacketConnContext interface {
    22  	PlainContext
    23  	Metadata() *Metadata
    24  	PacketConn() net.PacketConn
    25  }