Skip to content

QUIC API

QuicConnection is the supported sans-I/O QUIC facade. It does not read from or write to sockets.

Connection

QuicConnection

QUIC connection facade backed exclusively by the native packet core.

Preferred addresses are parsed and validated by TLS but are not activated until path creation and CID installation can be performed atomically.

configuration property

configuration

original_destination_connection_id property

original_destination_connection_id

open_outbound_streams property

open_outbound_streams

Return locally initiated streams not yet terminal in both directions.

max_concurrent_bidi_streams property

max_concurrent_bidi_streams

max_concurrent_uni_streams property

max_concurrent_uni_streams

ech_accepted property

ech_accepted

ech_retry_configs property

ech_retry_configs

get_cipher

get_cipher()

get_peercert

get_peercert()

get_issuercerts

get_issuercerts()

connect

connect(addr, now)

receive_datagram

receive_datagram(data, addr, now)

receive_many_datagrams

receive_many_datagrams(datagrams, addr, now)

receive_gro_buffer

receive_gro_buffer(buffer, segment_size, addr, now)

datagrams_to_send

datagrams_to_send(now)

get_timer

get_timer()

handle_timer

handle_timer(now)

next_event

next_event()

get_next_available_stream_id

get_next_available_stream_id(is_unidirectional=False)

Peek at the ID which the next send will create.

send_stream_data

send_stream_data(stream_id, data, end_stream=False)

reset_stream

reset_stream(stream_id, error_code)

stop_stream

stop_stream(stream_id, error_code)

send_datagram_frame

send_datagram_frame(data)

send_ping

send_ping(uid)

request_key_update

request_key_update()

change_connection_id

change_connection_id()

close

close(error_code=QuicErrorCode.NO_ERROR, frame_type=None, reason_phrase='')

Errors

QuicConnectionError

Bases: Exception

Protocol versions

QuicProtocolVersion

Bases: IntEnum

NEGOTIATION class-attribute instance-attribute

NEGOTIATION = 0

VERSION_1 class-attribute instance-attribute

VERSION_1 = 1

VERSION_2 class-attribute instance-attribute

VERSION_2 = 1798521807

Use qh3.QuicProtocolVersion as the canonical import.