def make_client(): client_configuration = QuicConfiguration(is_client=True) client_configuration.load_verify_locations(cafile=SERVER_CACERTFILE) client = QuicConnection(configuration=client_configuration) client._ack_delay = 0 return client
def make_connection(): server_configuration = QuicConfiguration(is_client=False) server_configuration.load_cert_chain(SERVER_CERTFILE, SERVER_KEYFILE) quic = QuicConnection(configuration=server_configuration) quic._ack_delay = 0 return h3.H3Connection(quic)