Optional
codemaps stream error codes to reasons
defaults to serverDefault
server needs to be able to sign and verify symmetrically.
Optional
logger?: LoggerOptional
mincan be set to override the starting timeout for accepted connections
Optional
reasonmaps stream error reasons to stream error codes
Optional
resolvedefaults to using OS DNS resolver
Optional
codeOptional
logger?: LoggerOptional
minOptional
reasonReadonly
[initProtected
_closedProtected
_closedPOptional
codeCustom code to reason converted for new connections.
Protected
configProtected
cryptoReadonly
isDetermines if socket is shared.
Protected
loggerOptional
minThe minimum idle timeout to be used for new connections.
Optional
reasonCustom reason to code converter for new connections.
Protected
resolveProtected
socketServer is no longer accepting connections.
Protected
handleProtected
handleProtected
handleProtected
handleHandles EventQUICServerClose
.
Registered once.
This event propagates errors minus the internal errors.
If this event is dispatched first before QUICServer.stop
, it represents
an evented close. This could originate from the QUICSocket
. If it was
from the QUICSocket
, then here it will stop all connections with an
transport code InternalError
.
Protected
handleHandles EventQUICServerError
.
Internal errors will be thrown upwards to become an uncaught exception.
Protected
handleProtected
handleProtected
mintCreates a retry token. This will embed peer host IP and DCID into the token. It will authenticate the data by providing a signature signed by our key.
Starts the QUICServer.
Optional
host?: stringtarget host, ignored if socket is shared
Optional
ipv6force using IPv6 even when using ::
Optional
port?: numbertarget port, ignored if socket is shared
Optional
reusereuse existing port
Stops the QUICServer.
Updates the QUICConfig
for new connections.
It will not affect existing connections, they will keep using the old
QUICConfig
.
Protected
validateValidates the retry token. This will check that the token was signed by us. And it will check that the current host IP is the same as the one put into the token. This proves that the peer can in fact receive and send from the host IP. This returns the DCID inside the token, which was the original DCID.
Generated using TypeDoc
Constructs a QUIC server.