mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
23 lines
406 B
Go
23 lines
406 B
Go
package main
|
|
|
|
import (
|
|
quic "github.com/lucas-clemente/quic-go"
|
|
"github.com/lucas-clemente/quic-go/utils"
|
|
)
|
|
|
|
func main() {
|
|
addr := "https://quic.clemente.io:6121"
|
|
|
|
utils.SetLogLevel(utils.LogLevelDebug)
|
|
|
|
client, err := quic.NewClient(addr, func(bool) {}, func() error { return nil })
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
err = client.Listen()
|
|
defer client.Close(nil)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|