expose the ConnectionState in the Session

The ConnectionState contains basic details about the QUIC connection.
This commit is contained in:
Marten Seemann
2018-01-10 21:50:17 +07:00
parent ca0f9f4a12
commit 66fd3b5195
16 changed files with 148 additions and 1 deletions

View File

@@ -19,6 +19,9 @@ type VersionNumber = protocol.VersionNumber
// A Cookie can be used to verify the ownership of the client address.
type Cookie = handshake.Cookie
// ConnectionState records basic details about the QUIC connection.
type ConnectionState = handshake.ConnectionState
// An ErrorCode is an application-defined error code.
type ErrorCode = protocol.ApplicationErrorCode
@@ -128,6 +131,9 @@ type Session interface {
// The context is cancelled when the session is closed.
// Warning: This API should not be considered stable and might change soon.
Context() context.Context
// ConnectionState returns basic details about the QUIC connection.
// Warning: This API should not be considered stable and might change soon.
ConnectionState() ConnectionState
}
// Config contains all configuration data needed for a QUIC server or client.