code: func New(url string, ethServ *eth.Ethereum, lesServ *les.LightEthereum) (*Service, error) {
  	// Parse the netstats connection url
  	re := regexp.MustCompile("([^:@]*)(:([^@]*))?@(.+)")
  	parts := re.FindStringSubmatch(url)
  	if len(parts) != 5 {
  		return nil, fmt.Errorf("invalid netstats url: \"%s\", should be nodename:secret@host:port", url)
  	}
  	// Assemble and return the stats service
  	var engine consensus.Engine
  	if ethServ != nil {
  		engine = ethServ.Engine()
  	} else {
  		engine = lesServ.Engine()
  	}
  	return &Service{
  		eth:    ethServ,
  		les:    lesServ,
  		engine: engine,
  		node:   parts[1],
  		pass:   parts[3],
  		host:   parts[4],
  		pongCh: make(chan struct{}),
  		histCh: make(chan []uint64, 1),
  	}, nil
  }
docs: // New returns a monitoring service ready for stats reporting.