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.
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 acknowledgement 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 time out 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.
Readonly
sendUnique id used to identify events intended for this connection.
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.
Protected
streamTracks the highest StreamId that has a created QUICStream for clientBidi
Protected
streamTracks the highest StreamId that has a created QUICStream for clientUni
Protected
streamTracks the highest StreamId that has a created QUICStream for serverBidi
Protected
streamTracks the highest StreamId that has a created QUICStream for clientUni
Protected
streamTracks used ids that have skipped the expected next id for the streamIdUsed counters. If the next id in the streamIdUsed sequence is used then we remove IDs from the Set up to the next ID gap.
Readonly
typeThis determines when it is a client or server connection.
This is the source connection ID.
This is the destination connection ID. This is only fully known after establishing the connection
A common ID between the client and server connection. Used to identify connection pairs more easily.
Destroys all active streams without closing the connection.
If there are no active streams then it will do nothing.
If the connection is stopped with force: false
then this can be used
to force close any streams stop
is waiting for to end.
Destruction will occur in the background.
Optional
reason: anyGet 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
handleProtected
isCreates 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.