forked from quic-go/quic-go
add some useful options to example server (commented out)
This commit is contained in:
@@ -20,6 +20,8 @@ func main() {
|
|||||||
go func() {
|
go func() {
|
||||||
log.Println(http.ListenAndServe("localhost:6060", nil))
|
log.Println(http.ListenAndServe("localhost:6060", nil))
|
||||||
}()
|
}()
|
||||||
|
// runtime.SetBlockProfileRate(1)
|
||||||
|
|
||||||
verbose := flag.Bool("v", false, "verbose")
|
verbose := flag.Bool("v", false, "verbose")
|
||||||
bindTo := flag.String("bind", "localhost", "bind to")
|
bindTo := flag.String("bind", "localhost", "bind to")
|
||||||
certPath := flag.String("certpath", "", "certificate directory")
|
certPath := flag.String("certpath", "", "certificate directory")
|
||||||
@@ -57,6 +59,8 @@ func main() {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// server.CloseAfterFirstRequest = true
|
||||||
|
|
||||||
err = server.ListenAndServe(*bindTo+":6121", nil)
|
err = server.ListenAndServe(*bindTo+":6121", nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user