Properties Jump to heading
Jump to headingendpoint: QuicEndpoint
The endpoint for this connection.
Jump to headinghandshake: Promise<void>
Returns a promise that resolves when the TLS handshake is complete.
Jump to headingremoteAddr: NetAddr
Return the remote address for the connection. Clients may change addresses at will, for example when switching to a cellular internet connection.
Jump to headingprotocol: string | undefined
The negotiated ALPN protocol, if provided. Only available after the handshake is complete.
Jump to headingserverName: string | undefined
The negotiated server name. Only available on the server after the handshake is complete.
Jump to headingclosed: Promise<QuicCloseInfo>
Returns a promise that resolves when the connection is closed.
Jump to headingincomingBidirectionalStreams: ReadableStream<QuicBidirectionalStream>
A stream of bidirectional streams opened by the peer.
Jump to headingincomingUnidirectionalStreams: ReadableStream<QuicReceiveStream>
A stream of unidirectional streams opened by the peer.
Jump to headingmaxDatagramSize: number
Returns the datagram stream for sending and receiving datagrams.
Methods Jump to heading
Jump to headingclose(info?: QuicCloseInfo): void
Close closes the listener. Any pending accept promises will be rejected with errors.
Jump to headingcreateBidirectionalStream(options?: QuicSendStreamOptions): Promise<QuicBidirectionalStream>
Opens and returns a bidirectional stream.
Jump to headingcreateUnidirectionalStream(options?: QuicSendStreamOptions): Promise<QuicSendStream>
Opens and returns a unidirectional stream.
Jump to headingsendDatagram(data: Uint8Array): Promise<void>
Send a datagram. The provided data cannot be larger than
maxDatagramSize
.
Jump to headingreadDatagram(): Promise<Uint8Array>
Receive a datagram.