U
    Û~fhš  ã                   @   s$  d dl Zd dlZej d¡rØd dlZd dlmZ d dl	m
Z
mZmZ d dlmZmZ d dlmZmZmZ dZdd	„ Zd
d„ ZdeefiZej d¡rÌd dlZd dlmZmZmZ dd„ Zdd„ Zeefed< ddd„ZnHdZd dl m!Z! G dd„ dƒZ"G dd„ dƒZG dd„ dƒZG dd„ dƒZdS ) é    NZdoq©ÚNullContext)ÚAsyncioQuicConnectionÚAsyncioQuicManagerÚAsyncioQuicStream)ÚAsyncQuicConnectionÚAsyncQuicManager)ÚSyncQuicConnectionÚSyncQuicManagerÚSyncQuicStreamTc                  O   s   t d ƒS ©Nr   )ÚargsÚkwargs© r   ú5/tmp/pip-unpacked-wheel-z_du6bmr/dns/quic/__init__.pyÚnull_factory   s    r   c                 O   s
   t ||ŽS r   )r   ©Úcontextr   r   r   r   r   Ú_asyncio_manager_factory   s    r   ZasyncioÚtrio)ÚTrioQuicConnectionÚTrioQuicManagerÚTrioQuicStreamc                   C   s   t  ¡ S r   )r   Zopen_nurseryr   r   r   r   Ú_trio_context_factory-   s    r   c                 O   s   t | f|ž|ŽS r   )r   r   r   r   r   Ú_trio_manager_factory0   s    r   c                 C   s   | d krt j ¡ } t|  ¡  S r   )ÚdnsZasyncbackendZget_default_backendÚ_async_factoriesÚname)Úbackendr   r   r   Úfactories_for_backend5   s    
r   F)ÚAnyc                   @   s   e Zd ZdS )ÚAsyncQuicStreamN©Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r!   ?   s   r!   c                   @   s   e Zd Zedœdd„ZdS )r   ©Úreturnc                 Ã   s   t ‚d S r   ©ÚNotImplementedError©Úselfr   r   r   Úmake_streamC   s    zAsyncQuicConnection.make_streamN©r#   r$   r%   r    r,   r   r   r   r   r   B   s   r   c                   @   s   e Zd ZdS )r   Nr"   r   r   r   r   r   F   s   r   c                   @   s   e Zd Zedœdd„ZdS )r	   r&   c                 C   s   t ‚d S r   r(   r*   r   r   r   r,   J   s    zSyncQuicConnection.make_streamNr-   r   r   r   r   r	   I   s   r	   )N)#Zdns._featuresr   Zdns.asyncbackendZ	_featuresZhaveZaioquic.quic.configurationZaioquicZdns._asyncbackendr   Zdns.quic._asyncior   r   r   Zdns.quic._commonr   r   Zdns.quic._syncr	   r
   r   Z	have_quicr   r   r   r   Zdns.quic._trior   r   r   r   r   r   Útypingr    r!   r   r   r   r   Ú<module>   s0   