// ListenAndServe listens on proxy.Address and then calls Serve to handle
// requests on incoming connections.
ListenAndServe listens on proxy.Address and then calls Serve to handle
requests on incoming connections.
// ListenAndServe listens on proxy . Address and then calls Serve to handle // requests on incoming connections .
func (p *HTTPProxy) ListenAndServe() {
	server := http.NewServeMux()
	server.HandleFunc("/", p.ServeHTTP)
	log.Debugf("Handling http connection on %s", p.Address)
	err := http.ListenAndServe(p.Address, server)
	if err != nil {
		log.Fatalf("Error while listening http connection on %s: %v", p.Address, err)
	}
}
func ( p * HTTPProxy ) ListenAndServe ( ) { server := http . NewServeMux ( ) server . HandleFunc ( " " , p . ServeHTTP ) log . Debugf ( " " , p . Address ) err := http . ListenAndServe ( p . Address , server ) if err != nil { log . Fatalf ( " " , p . Address , err ) } }
ListenAndServe listens on proxy.Address and then calls Serve to handle
requests on incoming connections.
ListenAndServe listens on proxy . Address and then calls Serve to handle requests on incoming connections .