Readonly
[initProtected
_remoteRemote host which can change on every QUICConnection.recv
.
Protected
_remoteRemote port which can change on every QUICConnection.recv
.
Protected
caDERsArray of independent CA certificates in DER format.
Protected
certDERsChain of local certificates from leaf to root in DER format.
Readonly
closedPResolves once the connection has closed.
Protected
codeProtected
configProtected
Optional
connQuiche connection timer. This performs time delayed state transitions.
Readonly
connectionThis is the source connection ID.
Protected
errorStores the last dispatched error. If no error, it will be null
.
QUICConnection.stop
will need this if it is called by the user concurrent
with handling EventQUICConnectionError
. It ensures that this.stop
uses
the original error when force destroying the streams.
Protected
Optional
keepKeep alive timer.
Quiche does not natively ensure activity on the connection. This interval timer guarantees that there will be activity on the connection by sending acknowlegement eliciting frames, which will cause the peer to acknowledge.
This is still useful even if the config.maxIdleTimeout
is set to 0, which
means the connection will never timeout due to being idle.
This mechanism will only start working after secureEstablishedP
.
Protected
loggerProtected
reasonProtected
recvThis ensures that recv
is serialised.
Prevents a new recv
call intercepting the previous recv
call that is
still finishing up with a send
call.
Protected
rejectOptional
reason: anyProtected
resolveProtected
resolveProtected
secureSecure connection establishment means that this connection has completed peer certificate verification, and the connection is ready to be used.
Protected
secureResolves after connection is established and peer certs have been verified.
Protected
socketProtected
streamClient initiated bidirectional stream starts at 0. Increment by 4 to get the next ID.
Protected
streamClient initiated unidirectional stream starts at 2. Increment by 4 to get the next ID.
Protected
streamServer initiated bidirectional stream starts at 1. Increment by 4 to get the next ID.
Protected
streamServer initiated unidirectional stream starts at 3. Increment by 4 to get the next ID.
Readonly
typeThis determines when it is a client or server connection.
Get connection error.
This could be undefined
if connection timed out.
Protected
handleHandles EventQUICConnectionClose
.
Registered once.
This event means that this.conn.close()
is already called.
It does not mean that this.closedP
is resolved. The resolving of
this.closedP
depends on the this.connTimeoutTimer
.
Protected
handleHandle EventQUICConnectionError
.
QUIC connections always close with errors. Graceful errors are logged out at INFO level, while non-graceful errors are logged out at ERROR level.
Internal errors will be thrown upwards to become an uncaught exception.
Protected
handleProtected
handleProtected
handleCreates a new QUIC stream on the connection.
Protected
processProtected
setStarts the QUIC connection.
This will complete the handshake and verify the peer's certificate. The connection will be ready to be used after this resolves. The peer's verification of the local certificate occurs concurrently.
Optional
opts: { Optional
data?: Uint8Arrayserver connections receive initial data
Optional
remoteserver connections receive remote host and port
Optional
ctx: Partial<ContextTimedInput>timed context overrides config.minIdleTimeout
which only
works if config.maxIdleTimeout
is greater than
config.minIdleTimeout
ctx.timer
or config.minIdleTimeout
Protected
startStops the QUIC connection.
Protected
stopGenerated using TypeDoc
Constructs a QUIC connection.