func (l *HTTPStats) Listen(s *system.Info) error {
	l.system = s
	mux := http.NewServeMux()
	mux.HandleFunc("/", l.jsonHandler)
	l.httpServer = &http.Server{
		Addr:      l.address,
		Handler:   mux,
		TLSConfig: l.tls,
	}

	ln, err := net.Listen("tcp", l.address)
	if err != nil {
		return err
	}

	l.listen = ln

	return nil
}
// Listen starts listening on the listener's network address.
Listen starts listening on the listener's network address.
// Listen starts listening on the listener ' s network address .
func (l *HTTPStats) Listen(s *system.Info) error {
	l.system = s
	mux := http.NewServeMux()
	mux.HandleFunc("/", l.jsonHandler)
	l.httpServer = &http.Server{
		Addr:      l.address,
		Handler:   mux,
		TLSConfig: l.tls,
	}
	ln, err := net.Listen("tcp", l.address)
	if err != nil {
		return err
	}
	l.listen = ln
	return nil
}
func ( l * HTTPStats ) Listen ( s * system . Info ) error { l . system = s mux := http . NewServeMux ( ) mux . HandleFunc ( " " , l . jsonHandler ) l . httpServer = & http . Server { Addr : l . address , Handler : mux , TLSConfig : l . tls , } ln , err := net . Listen ( " " , l . address ) if err != nil { return err } l . listen = ln return nil }
Listen starts listening on the listener's network address.
Listen starts listening on the listener ' s network address .