Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ListenAndServeTLS (0.29 sec)

  1. docs/iam/access-manager-plugin.go

    	}
    
    	if certFile != "" || keyFile != "" {
    		if certFile == "" || keyFile == "" {
    			log.Fatal("Please provide both a key file and a cert file to enable TLS.")
    		}
    		serveFunc = func() error {
    			return http.ListenAndServeTLS(":8080", certFile, keyFile, nil)
    		}
    	}
    
    	http.HandleFunc("/", mainHandler)
    
    	log.Print("Listening on :8080")
    	log.Fatal(serveFunc())
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Feb 08 17:15:20 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  2. src/net/http/example_test.go

    		io.WriteString(w, "Hello, TLS!\n")
    	})
    
    	// One can use generate_cert.go in crypto/tls to generate cert.pem and key.pem.
    	log.Printf("About to listen on 8443. Go to https://127.0.0.1:8443/")
    	err := http.ListenAndServeTLS(":8443", "cert.pem", "key.pem", nil)
    	log.Fatal(err)
    }
    
    func ExampleListenAndServe() {
    	// Hello world, the web server
    
    	helloHandler := func(w http.ResponseWriter, req *http.Request) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 19 16:12:45 UTC 2021
    - 5.4K bytes
    - Viewed (0)
  3. src/crypto/tls/example_test.go

    		log.Fatal(err)
    	}
    	cfg := &tls.Config{Certificates: []tls.Certificate{cert}}
    	srv := &http.Server{
    		TLSConfig:    cfg,
    		ReadTimeout:  time.Minute,
    		WriteTimeout: time.Minute,
    	}
    	log.Fatal(srv.ListenAndServeTLS("", ""))
    }
    
    func ExampleConfig_verifyConnection() {
    	// VerifyConnection can be used to replace and customize connection
    	// verification. This example shows a VerifyConnection implementation that
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 7.8K bytes
    - Viewed (0)
Back to top