rename the session to connection

This commit is contained in:
Marten Seemann
2022-03-27 11:25:42 +01:00
parent d7ad1b6b9b
commit 4b17343631
16 changed files with 574 additions and 574 deletions

View File

@@ -12,7 +12,7 @@ import (
"log"
"math/big"
quic "github.com/lucas-clemente/quic-go"
"github.com/lucas-clemente/quic-go"
)
const addr = "localhost:4242"
@@ -36,11 +36,11 @@ func echoServer() error {
if err != nil {
return err
}
sess, err := listener.Accept(context.Background())
conn, err := listener.Accept(context.Background())
if err != nil {
return err
}
stream, err := sess.AcceptStream(context.Background())
stream, err := conn.AcceptStream(context.Background())
if err != nil {
panic(err)
}
@@ -54,12 +54,12 @@ func clientMain() error {
InsecureSkipVerify: true,
NextProtos: []string{"quic-echo-example"},
}
session, err := quic.DialAddr(addr, tlsConf, nil)
conn, err := quic.DialAddr(addr, tlsConf, nil)
if err != nil {
return err
}
stream, err := session.OpenStreamSync(context.Background())
stream, err := conn.OpenStreamSync(context.Background())
if err != nil {
return err
}