sync: quic-go 0.42.0

Signed-off-by: Gaukas Wang <i@gaukas.wang>
This commit is contained in:
Gaukas Wang 2024-04-23 22:34:55 -06:00
parent d40dde9b9b
commit 4973374ea5
No known key found for this signature in database
GPG key ID: 6F0DF52D710D8189
252 changed files with 13121 additions and 5437 deletions

View file

@ -37,14 +37,19 @@ func echoServer() error {
if err != nil {
return err
}
defer listener.Close()
conn, err := listener.Accept(context.Background())
if err != nil {
return err
}
stream, err := conn.AcceptStream(context.Background())
if err != nil {
panic(err)
}
defer stream.Close()
// Echo through the loggingWriter
_, err = io.Copy(loggingWriter{stream}, stream)
return err
@ -59,11 +64,13 @@ func clientMain() error {
if err != nil {
return err
}
defer conn.CloseWithError(0, "")
stream, err := conn.OpenStreamSync(context.Background())
if err != nil {
return err
}
defer stream.Close()
fmt.Printf("Client: Sending '%s'\n", message)
_, err = stream.Write([]byte(message))