Skip to content

Instantly share code, notes, and snippets.

@TvdW TvdW/test.go
Last active Aug 26, 2019

What would you like to do?
package main
import (
func main() {
srv := &http.Server{Addr: ":443", Handler: http.HandlerFunc(handle)}
go func() {
srv.ListenAndServeTLS("chain.pem", "key.pem")
time.Sleep(2000 * time.Millisecond)
func handle(w http.ResponseWriter, r *http.Request) {
log.Printf("Got connection: %s", r.Proto)
time.Sleep(5000 * time.Millisecond)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.