ó
    ð›‘h  ã                   óZ  • S SK Jr  S SKJr  SS/r\R                  R                  \5        \R                  R                  \5        \R                  R                  \5        \R                  R                  \5        \R                  R                  \5        Sr\S	S j5       r\S 5       rg)
é    )Úpublic)ÚparseÚrsÚrss)Ú
create_urlÚ	parse_urlNc                 ó6  • [        U5      [        :X  d   eU S:X  a  SU-  nO\Ub%  [        U5      [        :X  a  U[        SS5      ;   d   eUb  SX4-  nO*U(       a  SR	                  U 5      nOSR	                  U 5      nU(       a  SnOS	nS
R	                  XC5      $ )aV  
Create a RawSocket URL from components.

:param hostname: RawSocket server hostname (for TCP/IP sockets) or
    filesystem path (for Unix domain sockets).
:type hostname: str

:param port: For TCP/IP sockets, RawSocket service port or ``None`` (to select default
    ports ``80`` or ``443`` depending on ``isSecure``. When ``hostname=="unix"``,
    this defines the path to the Unix domain socket instead of a TCP/IP network socket.
:type port: int or str

:param isSecure: Set ``True`` for secure RawSocket (``rss`` scheme).
:type isSecure: bool

:returns: Constructed RawSocket URL.
:rtype: str
Úunixzunix:%sr   éÿÿ  z%s:%dz{}:443z{}:80r   r   z{}://{})ÚtypeÚboolÚintÚrangeÚformat)ÚhostnameÚportÚisSecureÚnetlocÚschemes        Ú[C:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\autobahn/rawsocket/util.pyr   r   3   s›   € ô* �‹>œTÓ!Ð!Ð!à�6Óà˜TÑ!‰à‰|¤ T£
¬cÓ 1°d¼eÀAÀu»oÓ6MÐNÐNàÑØ Ð/Ñ/‰FæØ!Ÿ™¨Ó2‘à Ÿ™¨Ó1�æØ‰àˆà×Ñ˜FÓ+Ð+ó    c                 ó:  • [         R                   " U 5      nUR                  S;  a$  [        SR                  UR                  5      5      eUR                  (       a  UR                  S:X  a  [        S5      eUR
                  b4  UR
                  S:w  a$  [        SR                  UR
                  5      5      eUR                  b4  UR                  S:w  a$  [        SR                  UR                  5      5      eUR                  S:X  aI  UR                  UR                  -   nUR                  S5      S	   nUR                  S
:H  UR                  U4$ UR                  b4  UR                  S:w  a$  [        SR                  UR                  5      5      eUR                  b  UR                  S:X  a  UR                  S:X  a  SnOSnO[        UR                  5      nUS	:  d  US:”  a  [        SR                  U5      5      eUR                  S
:H  UR                  U4$ )a·  
Parses as RawSocket URL into it's components and returns a tuple:

 - ``isSecure`` is a flag which is ``True`` for ``rss`` URLs.
 - ``host`` is the hostname or IP from the URL.

and for TCP/IP sockets:

 - ``tcp_port`` is the port from the URL or standard port derived from
   scheme (``rs`` => ``80``, ``rss`` => ``443``).

or for Unix domain sockets:

 - ``uds_path`` is the path on the local host filesystem.

:param url: A valid RawSocket URL, i.e. ``rs://localhost:9000`` for TCP/IP sockets or
    ``rs://unix:/tmp/file.sock`` for Unix domain sockets (UDS).
:type url: str

:returns: A 3-tuple ``(isSecure, host, tcp_port)`` (TCP/IP) or ``(isSecure, host, uds_path)`` (UDS).
:rtype: tuple
)r   r   z@invalid RawSocket URL: protocol scheme '{}' is not for RawSocketÚ z'invalid RawSocket URL: missing hostnamez+invalid RawSocket URL: non-empty query '{}'z.invalid RawSocket URL: non-empty fragment '{}'r
   Ú:é   r   z*invalid RawSocket URL: non-empty path '{}'r   éP   i»  r   zinvalid port {})Úurlparser   Ú	Exceptionr   r   ÚqueryÚfragmentr   ÚpathÚsplitr   r   )ÚurlÚparsedÚfpÚuds_pathÚtcp_ports        r   r   r   `   sº  € ô0 ×Ò˜sÓ#€Fà‡}�}˜MÓ)ÜÐZ×aÑaÐbh×boÑboÓpÓqÐqà�?�?˜fŸo™o°Ó3ÜÐAÓBÐBà‡|�|Ñ F§L¡L°BÓ$6ÜÐE×LÑLÈVÏ\É\ÓZÓ[Ð[à‡�Ñ" v§¡¸"Ó'<ÜÐH×OÑOÐPV×P_ÑP_Ó`ÓaÐaà‡�˜&Ó ð �]‰]˜VŸ[™[Ñ(ˆØ—8‘8˜C“= Ñ#ˆð
 �}‰} Ñ% v§¡¸Ð@Ð@ð
 �;‰;Ñ" v§{¡{°bÓ'8ÜÐH×OÑOÐPV×P[ÑP[Ó\Ó]Ð]à�;‰;Ñ &§+¡+°Ó"3Ø�}‰} Ó$Ø‘à‘ä˜6Ÿ;™;Ó'ˆHà�a‹<˜8 eÓ+ÜÐ-×4Ñ4°XÓ>Ó?Ð?à�}‰} Ñ% v§¡¸Ð@Ð@r   )NF)Úautobahn.utilr   Úurllibr   r   Ú	wsschemesÚuses_relativeÚextendÚuses_netlocÚuses_paramsÚ
uses_queryÚuses_fragmentÚ__all__r   r   © r   r   Ú<module>r3      s°   ðõ8 !õ %à�5ˆM€	Ø × Ñ × Ñ ˜iÔ (Ø × Ñ × Ñ ˜IÔ &Ø × Ñ × Ñ ˜IÔ &Ø × Ñ × Ñ ˜9Ô %Ø × Ñ × Ñ ˜iÔ (ð€ð ó),ó ð),ðX ñBAó ñBAr   