func (this *NetworkList) Build() *v2net.NetworkList { list := new(v2net.NetworkList) for _, network := range *this { list.Network = append(list.Network, network.Build()) } return list }
func (s *Server) Network() net.NetworkList { list := net.NetworkList{ Network: []net.Network{net.Network_TCP}, } if s.config.UdpEnabled { list.Network = append(list.Network, net.Network_UDP) } return list }
func (v *NetworkList) Build() *v2net.NetworkList { if v == nil { return &v2net.NetworkList{ Network: []v2net.Network{v2net.Network_TCP}, } } list := new(v2net.NetworkList) for _, network := range *v { list.Network = append(list.Network, network.Build()) } return list }