lxd/endpoints/network.go
func networkCreateListener(address string, cert *shared.CertInfo) net.Listener {
	listener, err := net.Listen("tcp", util.CanonicalNetworkAddress(address))
	if err != nil {
		logger.Error("Cannot listen on https socket, skipping...", log.Ctx{"err": err})
		return nil
	}
	return networkTLSListener(listener, cert)
}
func networkCreateListener(address string, cert *shared.CertInfo) net.Listener {
	listener, err := net.Listen("tcp", util.CanonicalNetworkAddress(address))
	if err != nil {
		logger.Error("Cannot listen on https socket, skipping...", log.Ctx{"err": err})
		return nil
	}
	return networkTLSListener(listener, cert)
}
// Create a new net.Listener bound to the tcp socket of the network endpoint.