refactor: continue to simplify engine/netx (#769)

The objective of this diff is to simplify the code inside engine/netx
while moving more bits of code inside netxlite.

See https://github.com/ooni/probe/issues/2121
This commit is contained in:
Simone Basso 2022-05-31 08:11:07 +02:00 committed by GitHub
commit e4f10eeac2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 312 additions and 344 deletions

View file

@ -1,12 +0,0 @@
package quicdialer
import (
"crypto/tls"
"github.com/lucas-clemente/quic-go"
)
// connectionState returns the ConnectionState of a QUIC Session.
func connectionState(sess quic.EarlyConnection) tls.ConnectionState {
return sess.ConnectionState().TLS.ConnectionState
}

View file

@ -61,3 +61,8 @@ func (h HandshakeSaver) DialContext(ctx context.Context, network string,
})
return sess, nil
}
// connectionState returns the ConnectionState of a QUIC Session.
func connectionState(sess quic.EarlyConnection) tls.ConnectionState {
return sess.ConnectionState().TLS.ConnectionState
}