ó
è¦Rc           @`  s;  d  Z  d d l m Z m Z d d l Z d d l Z d d l m Z d d l m	 Z	 d d l
 m Z e e	 ƒ d e e f d „  ƒ  Yƒ Z d	 e f d
 „  ƒ  YZ d e f d „  ƒ  YZ e e	 ƒ d e f d „  ƒ  Yƒ Z e e	 ƒ d e e f d „  ƒ  Yƒ Z e e	 ƒ d e e f d „  ƒ  Yƒ Z d e f d „  ƒ  YZ d S(   s*   
Address objects for network connections.
i    (   t   divisiont   absolute_importN(   t   implementer(   t   IAddress(   t   FancyEqMixint
   _IPAddressc           B`  s/   e  Z d  Z d Z d „  Z d „  Z d „  Z RS(   sº  
    An L{_IPAddress} represents the address of an IP socket endpoint, providing
    common behavior for IPv4 and IPv6.

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

    @ivar host: A string containing the presentation format of the IP address;
        for example, "127.0.0.1" or "::1".
    @type host: C{str}

    @ivar port: An integer representing the port number.
    @type port: C{int}
    t   typet   hostt   portc         C`  s1   | d k s t  ‚ | |  _ | |  _ | |  _ d  S(   Nt   TCPt   UDP(   s   TCPs   UDP(   t   AssertionErrorR   R   R   (   t   selfR   R   R   (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyt   __init__$   s    		c         C`  s#   d |  j  j |  j |  j |  j f S(   Ns   %s(%s, %r, %d)(   t	   __class__t   __name__R   R   R   (   R   (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyt   __repr__+   s    c         C`  s   t  |  j |  j |  j f ƒ S(   N(   t   hashR   R   R   (   R   (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyt   __hash__0   s    (   s   types   hosts   port(   R   t
   __module__t   __doc__t   compareAttributesR   R   R   (    (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR      s
   		t   IPv4Addressc           B`  s   e  Z d  Z d d „ Z RS(   sÈ   
    An L{IPv4Address} represents the address of an IPv4 socket endpoint.

    @ivar host: A string containing a dotted-quad IPv4 address; for example,
        "127.0.0.1".
    @type host: C{str}
    c         C`  s?   t  j |  | | | ƒ | d  k	 r; t j d t d d ƒn  d  S(   NsM   twisted.internet.address.IPv4Address._bwHack is deprecated since Twisted 11.0t
   stackleveli   (   R   R   t   Nonet   warningst   warnt   DeprecationWarning(   R   R   R   R   t   _bwHack(    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR   >   s    	N(   R   R   R   R   R   (    (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR   5   s   t   IPv6Addressc           B`  s   e  Z d  Z RS(   sÝ   
    An L{IPv6Address} represents the address of an IPv6 socket endpoint.

    @ivar host: A string containing a colon-separated, hexadecimal formatted
        IPv6 address; for example, "::1".
    @type host: C{str}
    (   R   R   R   (    (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR   G   s   t   _ProcessAddressc           B`  s   e  Z d  Z RS(   sD   
    An L{interfaces.IAddress} provider for process transports.
    (   R   R   R   (    (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR   R   s   t   HostnameAddressc           B`  s/   e  Z d  Z d Z d „  Z d „  Z d „  Z RS(   s  
    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}
    t   hostnameR   c         C`  s   | |  _  | |  _ d  S(   N(   R    R   (   R   R    R   (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR   g   s    	c         C`  s   d |  j  j |  j |  j f S(   Ns
   %s(%s, %d)(   R   R   R    R   (   R   (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR   l   s    c         C`  s   t  |  j |  j f ƒ S(   N(   R   R    R   (   R   (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR   q   s    (   s   hostnames   port(   R   R   R   R   R   R   R   (    (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR   Z   s
   
		t   UNIXAddressc           B`  sY   e  Z d  Z d Z d d „ Z e e j d d ƒ d k	 rE d „  Z	 n  d „  Z
 d „  Z RS(	   s‡   
    Object representing a UNIX socket endpoint.

    @ivar name: The filename associated with this socket.
    @type name: C{str}
    t   namec         C`  s2   | |  _  | d  k	 r. t j d t d d ƒn  d  S(   NsM   twisted.internet.address.UNIXAddress._bwHack is deprecated since Twisted 11.0R   i   (   R"   R   R   R   R   (   R   R"   R   (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR      s    		t   samefilec         C`  si   t  t |  ƒ j | ƒ } | re |  j re | j re y t j j |  j | j ƒ SWqe t k
 ra qe Xn  | S(   s“   
            Overriding C{FancyEqMixin} to ensure the os level samefile
            check is done if the name attributes do not match.
            (   t   superR!   t   __eq__R"   t   ost   pathR#   t   OSError(   R   t   othert   res(    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR%   ‰   s    c         C`  s   d |  j  f S(   Ns   UNIXAddress(%r)(   R"   (   R   (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR   —   s    c         C`  sp   |  j  d  k r" t |  j d  f ƒ Sy, t j |  j  ƒ } t | j | j f ƒ SWn t k
 rk t |  j  ƒ SXd  S(   N(	   R"   R   R   R   R&   t   statt   st_inot   st_devR(   (   R   t   s1(    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR   ›   s    (   s   nameN(   R   R   R   R   R   R   t   getattrR&   R'   R%   R   R   (    (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR!   v   s   	t   _ServerFactoryIPv4Addressc           B`  s   e  Z d  Z d „  Z RS(   s@   Backwards compatability hack. Just like IPv4Address in practice.c         C`  s‹   t  | t ƒ r> t j d d t d d ƒ|  j |  j f | k St  | t ƒ r‡ |  j |  j |  j f } | j | j | j f } | | k St	 S(   Ns?   IPv4Address.__getitem__ is deprecated.  Use attributes instead.t   categoryR   i   (
   t
   isinstancet   tupleR   R   R   R   R   R   R   t   False(   R   R)   t   at   b(    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR%   ¬   s    
(   R   R   R   R%   (    (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyR0   ©   s   (   R   t
   __future__R    R   R   R&   t   zope.interfaceR   t   twisted.internet.interfacesR   t   twisted.python.utilR   t   objectR   R   R   R   R   R!   R0   (    (    (    sJ   /var/www/html/hlstest/hls-proxy/Twisted-13.2.0/twisted/internet/address.pyt   <module>   s    #2