%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/internet/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/internet/__pycache__/address.cpython-312.pyc

�

Ϫ�f����dZddlZddlmZmZddlmZddlmZddl	Z	ddlm
Z
ddlmZddl
mZmZdd	lmZee�e	j$d
d
��Gd�d
���Zee�e	j$d
d
��Gd�d���Zee�Gd�d��Ze	j$d
d
��ee�Gd�d���Ze	j$dddd
��ee�Gd�d���ZGd�de�Zy)z*
Address objects for network connections.
�N)�Optional�Union)�warn)�implementer)�Literal)�IAddress)�_asFilesystemBytes�_coerceToFilesystemEncoding)�platformT)�hash�auto_attribsc��eZdZUdZej
ejjddg���Ze	e
de
dfed<eed<e
ed<y)	�IPv4Addressat
    An L{IPv4Address} represents the address of an IPv4 socket endpoint.

    @ivar type: A string describing the type of transport, either 'TCP' or
        'UDP'.

    @ivar host: A string containing a dotted-quad IPv4 address; for example,
        "127.0.0.1".
    @type host: C{str}

    @ivar port: An integer representing the port number.
    @type port: C{int}
    �TCP�UDP��	validator�type�host�portN)�__name__�
__module__�__qualname__�__doc__�attr�ib�
validators�in_rrr�__annotations__�str�int���:/usr/lib/python3/dist-packages/twisted/internet/address.pyrrsT���3:�$�'�'��/�/�%�%�u�e�n�5�3�D�%�������.�
/���I�

�Ir#rc���eZdZUdZej
ejjddg���Ze	e
de
dfed<eed<e
ed<dZe
ed	<dZe	ee
fed
<y)�IPv6Addressa�
    An L{IPv6Address} represents the address of an IPv6 socket endpoint.

    @ivar type: A string describing the type of transport, either 'TCP' or
        'UDP'.

    @ivar host: A string containing a colon-separated, hexadecimal formatted
        IPv6 address; for example, "::1".
    @type host: C{str}

    @ivar port: An integer representing the port number.
    @type port: C{int}

    @ivar flowInfo: the IPv6 flow label.  This can be used by QoS routers to
        identify flows of traffic; you may generally safely ignore it.
    @type flowInfo: L{int}

    @ivar scopeID: the IPv6 scope identifier - roughly analagous to what
        interface traffic destined for this address must be transmitted over.
    @type scopeID: L{int} or L{str}
    rrrrrrr�flowInfo�scopeIDN)rrrrrrrrrrrrr r!r'r(r"r#r$r&r&/sp���,3:�$�'�'��/�/�%�%�u�e�n�5�3�D�%�������.�
/���I�

�I��H�c�� �G�U�3��8�_� r#r&c��eZdZdZy)�_ProcessAddresszD
    An L{interfaces.IAddress} provider for process transports.
    N)rrrrr"r#r$r*r*Qs��r#r*c�&�eZdZUdZeed<eed<y)�HostnameAddressa
    A L{HostnameAddress} represents the address of a L{HostnameEndpoint}.

    @ivar hostname: A hostname byte string; for example, b"example.com".
    @type hostname: L{bytes}

    @ivar port: An integer representing the port number.
    @type port: L{int}
    �hostnamerN)rrrr�bytesrr!r"r#r$r,r,Xs����O�

�Ir#r,F)r�repr�eqr
c���eZdZUdZej
ejje���Z	e
eed<e
ejdd��	dedefd�Zndedefd	�Zdefd
�Zd�Zy)�UNIXAddressz�
    Object representing a UNIX socket endpoint.

    @ivar name: The filename associated with this socket.
    @type name: C{bytes}
    )�	converter�name�samefileN�other�returnc��t||j�stS|j|jk(}|sM|jrA|jr5	tj
j
|j|j�S|S#t$rY|Sttf$r!}tj�s|�Yd}~|Sd}~wwxYw)z�
            Overriding C{attrs} to ensure the os level samefile
            check is done if the name attributes do not match.
            N)�
isinstance�	__class__�NotImplementedr4�os�pathr5�OSError�	TypeError�
ValueErrorr�isLinux)�selfr6�res�es    r$�__eq__zUNIXAddress.__eq__ys���
�e�T�^�^�4�%�%��)�)�u�z�z�)�C��4�9�9���� ��7�7�+�+�D�I�I�u�z�z�B�B��J������J�"�:�.� �$�+�+�-���.��J�� �s�3B�	C�C�!B=�=Cc�l�t||j�r|j|jk(StS�N)r9r:r4r;)rBr6s  r$rEzUNIXAddress.__eq__�s)���%����0��y�y�E�J�J�.�.�!�!r#c�F�|j}|�td|�nd}d|�d�S)N�zUNIXAddress(�))r4r
)rBr4�shows   r$�__repr__zUNIXAddress.__repr__�s.���y�y��8<�8H�*�2�t�4�d���d�X�Q�'�'r#c��|j�t|jdf�S	tj|j�}t|j
|jf�S#t$rt|j�cYSwxYwrG)r4rr:r<�stat�st_ino�st_devr>)rB�s1s  r$�__hash__zUNIXAddress.__hash__�sl���9�9�������.�/�/�	#�������#�B�����B�I�I�.�/�/���	#���	�	�?�"�	#�s�?A%�%B�B)rrrrrr�
converters�optionalr	r4rr.r�getattrr<r=�object�boolrEr rLrRr"r#r$r2r2is����$�D�G�G��/�/�*�*�+=�>��D�(�5�/���r�w�w�
�D�)�5�	��	�4�	�,	"��	"�4�	"�
(�#�(�
#r#r2c� �eZdZdZdedefd�Zy)�_ServerFactoryIPv4Addressz@Backwards compatibility hack. Just like IPv4Address in practice.r6r7c�>�t|t�r-tdtd��|j|j
f|k(St|t�rK|j|j|j
f}|j|j|j
f}||k(StS)Nz?IPv4Address.__getitem__ is deprecated.  Use attributes instead.�)�category�
stacklevel)	r9�tupler�DeprecationWarningrrrrr;)rBr6�a�bs    r$rEz _ServerFactoryIPv4Address.__eq__�s����e�U�#��T�+��
�
�I�I�t�y�y�)�U�2�2�
��{�
+����D�I�I�t�y�y�1�A����U�Z�Z����4�A���6�M��r#N)rrrrrVrWrEr"r#r$rYrY�s��J��F��t�r#rY)rr<�typingrr�warningsr�zope.interfacerrr�twisted.internet.interfacesr�twisted.python.filepathr	r
�twisted.python.runtimer�srr&r*r,r2rYr"r#r$�<module>ris#���

�"��&���0�S�+�
�X������T��%���&���,
�X������T��%�!�!�&��!�@
�X����������T��%��X�����&������U��5�t�<��X��5#�5#��=�5#�x��r#

Zerion Mini Shell 1.0