rename the Session to Connection

This commit is contained in:
Marten Seemann 2022-03-26 14:35:01 +01:00
parent 42f3159497
commit e71c236232
19 changed files with 73 additions and 73 deletions

View file

@ -439,7 +439,7 @@ func (s *Server) maxHeaderBytes() uint64 {
return uint64(s.Server.MaxHeaderBytes)
}
func (s *Server) handleRequest(sess quic.Session, str quic.Stream, decoder *qpack.Decoder, onFrameError func()) requestError {
func (s *Server) handleRequest(sess quic.Connection, str quic.Stream, decoder *qpack.Decoder, onFrameError func()) requestError {
frame, err := parseNextFrame(str)
if err != nil {
return newStreamError(errorRequestIncomplete, err)

View file

@ -757,7 +757,7 @@ var _ = Describe("Server", func() {
s.TLSConfig = &tls.Config{}
stopAccept := make(chan struct{})
ln.EXPECT().Accept(gomock.Any()).DoAndReturn(func(context.Context) (quic.Session, error) {
ln.EXPECT().Accept(gomock.Any()).DoAndReturn(func(context.Context) (quic.Connection, error) {
<-stopAccept
return nil, errors.New("closed")
})
@ -791,13 +791,13 @@ var _ = Describe("Server", func() {
s.TLSConfig = &tls.Config{}
stopAccept1 := make(chan struct{})
ln1.EXPECT().Accept(gomock.Any()).DoAndReturn(func(context.Context) (quic.Session, error) {
ln1.EXPECT().Accept(gomock.Any()).DoAndReturn(func(context.Context) (quic.Connection, error) {
<-stopAccept1
return nil, errors.New("closed")
})
ln1.EXPECT().Addr() // generate alt-svc headers
stopAccept2 := make(chan struct{})
ln2.EXPECT().Accept(gomock.Any()).DoAndReturn(func(context.Context) (quic.Session, error) {
ln2.EXPECT().Accept(gomock.Any()).DoAndReturn(func(context.Context) (quic.Connection, error) {
<-stopAccept2
return nil, errors.New("closed")
})
@ -845,7 +845,7 @@ var _ = Describe("Server", func() {
s.TLSConfig = &tls.Config{}
stopAccept := make(chan struct{})
ln.EXPECT().Accept(gomock.Any()).DoAndReturn(func(context.Context) (quic.Session, error) {
ln.EXPECT().Accept(gomock.Any()).DoAndReturn(func(context.Context) (quic.Connection, error) {
<-stopAccept
return nil, errors.New("closed")
})
@ -880,13 +880,13 @@ var _ = Describe("Server", func() {
s.TLSConfig = &tls.Config{}
stopAccept1 := make(chan struct{})
ln1.EXPECT().Accept(gomock.Any()).DoAndReturn(func(context.Context) (quic.Session, error) {
ln1.EXPECT().Accept(gomock.Any()).DoAndReturn(func(context.Context) (quic.Connection, error) {
<-stopAccept1
return nil, errors.New("closed")
})
ln1.EXPECT().Addr() // generate alt-svc headers
stopAccept2 := make(chan struct{})
ln2.EXPECT().Accept(gomock.Any()).DoAndReturn(func(context.Context) (quic.Session, error) {
ln2.EXPECT().Accept(gomock.Any()).DoAndReturn(func(context.Context) (quic.Connection, error) {
<-stopAccept2
return nil, errors.New("closed")
})