// NewPFCPNode create a new PFCPNode listening on local address.
NewPFCPNode create a new PFCPNode listening on local address.
// NewPFCPNode create a new PFCPNode listening on local address .
func NewPFCPNode(ctx context.Context, upf *upf) *PFCPNode {
	conn, err := reuse.ListenPacket("udp", ":"+PFCPPort)
	if err != nil {
		log.Fatalln("ListenUDP failed", err)
	}
	metrics, err := metrics.NewPrometheusService()
	if err != nil {
		log.Fatalln("prom metrics service init failed", err)
	}
	return &PFCPNode{
		ctx:        ctx,
		PacketConn: conn,
		done:       make(chan struct{}),
		pConnDone:  make(chan string, 100),
		pConns:     make(map[string]*PFCPConn),
		upf:        upf,
		metrics:    metrics,
	}
}
func NewPFCPNode ( ctx context . Context , upf * upf ) * PFCPNode { conn , err := reuse . ListenPacket ( " " , " " + PFCPPort ) if err != nil { log . Fatalln ( " " , err ) } metrics , err := metrics . NewPrometheusService ( ) if err != nil { log . Fatalln ( " " , err ) } return & PFCPNode { ctx : ctx , PacketConn : conn , done : make ( chan struct { } ) , pConnDone : make ( chan string , 100 ) , pConns : make ( map [ string ] * PFCPConn ) , upf : upf , metrics : metrics , } }
NewPFCPNode create a new PFCPNode listening on local address.
NewPFCPNode create a new PFCPNode listening on local address .