+
    jO$                         ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	 ]P                  t ! R R4      t ! R R]4      t ! R R]4      t ! R	 R
]4      tR tRR ltRR ltR tR tR tR tR tR# )    N)utilc                   R   a  ] tR t^t o R
R ltR tR tRR ltR tR t	R t
R	tV tR# )
BaseSocketNc                R   W0n         W n        Wn        Vf3   \        P                  ! V P                  \        P
                  4      pRpMG\        P                  ! W@P                  \        P
                  4      p\        P                  ! V4       RpV P                  WVR7      V n
        R # )NFTbound)logconfcfg_addrsocketFAMILYSOCK_STREAMfromfdoscloseset_optionssock)selfaddressr
   r	   fdr   r   s   &&&&&  B/var/www/idalgo/venv/lib/python3.14/site-packages/gunicorn/sock.py__init__BaseSocket.__init__   st    	:==f.@.@ADE==[[&2D2DEDHHRLE$$T$7	    c                D    R V P                   P                  4       ,          # )z<socket %d>)r   filenor   s   &r   __str__BaseSocket.__str__$   s    tyy//111r   c                .    \        V P                  V4      # N)getattrr   )r   names   &&r   __getattr__BaseSocket.__getattr__'   s    tyy$''r   c                   VP                  \        P                  \        P                  ^4       V P                  P
                  '       dG   \        \        R4      '       d1    VP                  \        P                  \        P                  ^4       V'       g   V P                  V4       VP                  ^ 4       \        VR4      '       d   VP                  R4       VP                  V P                  P                   4       V#   \         d;   pTP                  \        P                  \        P                  39  d   h  Rp?LRp?ii ; i)   SO_REUSEPORTNset_inheritableT)
setsockoptr   
SOL_SOCKETSO_REUSEADDRr
   
reuse_porthasattrr(   OSErrorerrnoENOPROTOOPTEINVALbindsetblockingr)   listenbacklog)r   r   r   errs   &&& r   r   BaseSocket.set_options*   s    ))6+>+>BII   FN33 1 163F3FJ IIdO 4*++  &DII%%&  99U%6%6$EE Fs   #/D E0EEc                <    VP                  V P                  4       R # r!   )r3   r   )r   r   s   &&r   r3   BaseSocket.bind>   s    		$-- r   c                    V P                   f   R #  V P                   P                  4        R V n         R #   \         d0   pT P                  P	                  R\        T4      4        R p?L>R p?ii ; i)NzError while closing socket %s)r   r   r/   r	   infostr)r   es   & r   r   BaseSocket.closeA   sZ    99	CIIOO 	  	CHHMM93q6BB	Cs   5 A/ %A**A/c                    R# r'    r   s   &r   get_backlogBaseSocket.get_backlogL   s    	r   )r   r
   r	   r   r!   F)__name__
__module____qualname____firstlineno__r   r   r$   r   r3   r   rD   __static_attributes____classdictcell____classdict__s   @r   r   r      s-     82((!	 r   r   c                   ~   a a ] tR t^Pt o]P
                  tR tRV 3R llt]	R8X  d   R t
RtVtV ;t# R t
RtVtV ;t# )	TCPSocketc                    V P                   P                  '       d   R pMRpV P                  P                  4       pRW^ ,          V^,          3,          # )httpshttpz
%s://%s:%d)r
   is_sslr   getsockname)r   schemeaddrs   &  r   r   TCPSocket.__str__T   sF    99FFyy$$&vAwQ888r   c                   < VP                  \        P                  \        P                  ^4       \        SV `  WR7      # )r'   r   )r*   r   IPPROTO_TCPTCP_NODELAYsuperr   )r   r   r   	__class__s   &&&r   r   TCPSocket.set_options]   s2    **F,>,>Bw"4"55r   linuxc                   V P                   '       dZ   Rp V P                   P                  \        P                  \        P                  ^h4      p\
        P                  ! W4      ^,          # ^ #   \        \        3 d     ^ # i ; i)B BBBBBBBBIIIIIIIIIIIIIIIIIIIIIIII)	r   
getsockoptr   rZ   TCP_INFOstructunpackAttributeErrorr/   )r   fmttcp_info_structs   &  r   rD   TCPSocket.get_backlogb   sr    yyy(&*ii&:&:6;M;M;A??C'QO "==>rBB  '0 s   AA. .BBc                    R# rA   rC   r   s   &r   rD   rj   o   s    Ir   rC   rF   )rG   rH   rI   rJ   r   AF_INETr   r   r   PLATFORMrD   rK   rL   __classcell__r]   rN   s   @@r   rP   rP   P   s6     ^^F96 7	 		 	r   rP   c                   >   a  ] tR t^st o ]P
                  tR tRtV t	R# )
TCP6Socketc                R    V P                   P                  4       w  r pR W3,          # )zhttp://[%s]:%d)r   rU   )r   hostport_s   &   r   r   TCP6Socket.__str__w   s(    !YY224Q4,..r   rC   N)
rG   rH   rI   rJ   r   AF_INET6r   r   rK   rL   rM   s   @r   rq   rq   s   s     __F/ /r   rq   c                   Z   a a ] tR t^|t o]P
                  tRV 3R lltR tR t	Rt
VtV ;t# )
UnixSocketc                |  < Vfg    \         P                  ! V4      p\        P                  ! VP                  4      '       d   \         P                  ! V4       M\        RV,          4      h\        SV `-  WW4R7       R #   \         d2   pTP                  ^ ,          \        P                  8w  d   h  R p?LJR p?ii ; i)Nz%r is not a socketr   )r   statS_ISSOCKst_moderemove
ValueErrorr/   argsr0   ENOENTr\   r   )r   rW   r
   r	   r   str>   r]   s   &&&&&  r   r   UnixSocket.__init__   s    :	BWWT]
 ==,,IIdO$%9D%@AAS0  66!9, -s   A? ?B;
'B66B;c                (    R V P                   ,          # )zunix:%s)r   r   s   &r   r   UnixSocket.__str__   s    4==((r   c                P   \         P                  ! V P                  P                  4      pVP                  V P                  4       \
        P                  ! V P                  V P                  P                  V P                  P                  4       \         P                  ! V4       R # r!   )	r   umaskr
   r3   r   r   chownuidgid)r   r   	old_umasks   && r   r3   UnixSocket.bind   sX    HHTYY__-			$-- 

4==$))--?
r   rC   r!   )rG   rH   rI   rJ   r   AF_UNIXr   r   r   r3   rK   rL   rn   ro   s   @@r   ry   ry   |   s"     ^^F1) r   ry   c                    \        V \        4      '       d5   \        P                  ! V ^ ,          4      '       d	   \        pV# \
        p V# \        V \        \        34      '       d	   \        pV# \        RV ,          4      h)r   z Unable to create socket from: %r)

isinstancetupler   is_ipv6rq   rP   r=   bytesry   	TypeError)rW   	sock_types   & r   
_sock_typer      sq    $<<Q  "I  "I
 	 
D3,	'	'	  :TABBr   c                z   . pV P                   pV Uu. uF  p\        V\        4      '       g   K  VNK  	  ppV'       d   V\        V4      ,          pV Uu. uF  p\        V\        4      '       d   K  VNK  	  ppV P                  '       dL   \
        P                  P                  V P                  4      '       g   \        RV P                  ,          4      hV P                  '       dL   \
        P                  P                  V P                  4      '       g   \        RV P                  ,          4      hV'       dv   V Fm  p\        P                  ! V\        P                  \        P                  4      p	V	P                  4       p
\        V
4      pV! WWR7      pVP!                  V4       Ko  	  V# V Fr  p\        V4      pRp	\#        ^4       F  p V! W@V4      p	 M	  V	f2   VP-                  R
\/        V4      4       \:        P<                  ! ^4       VP!                  V	4       Kt  	  V# u upi u upi   \$         d   pTP&                  ^ ,          \(        P*                  8X  d   TP-                  R\/        T4      4       TP&                  ^ ,          \(        P0                  8X  d   TP-                  R\/        T4      4       RpTP-                  TP3                  \/        T4      \/        T4      R7      4       T^8  d/   TP5                  R	4       \6        P8                  ! ^4        Rp?EK_   Rp?EKf  Rp?ii ; i)z
Create a new socket for the configured addresses or file descriptors.

If a configured address is a tuple then a TCP socket is created.
If it is a string, a Unix socket is created. Otherwise, a TypeError is
raised.
zcertfile "%s" does not existzkeyfile "%s" does not existr{   NzConnection in use: %szInvalid address: %sz$connection to {addr} failed: {error})rW   errorzRetrying in 1 second.zCan't connect to %s)r   r   intlistcertfiler   pathexistsr   keyfiler   r   r   r   rU   r   appendranger/   r   r0   
EADDRINUSEr   r=   EADDRNOTAVAILformatdebugtimesleepsysexit)r
   r	   fds	listenersrW   r3   fdaddrladdrr   r   	sock_namer   listenerir>   msgs   &&&             r   create_socketsr      sh    I <<D#=ttz$'<ddtF=
$s)"@dd*T3*?TTdE@ }}}RWW^^DMM::7$--GHH|||BGGNN4<<886EFF B==V^^V5G5GHD((*I"9-I #=HX&   t$	qA S1    <II+SY7HHQK/ 2 e > A8  	"66!9 0 00II5s4yA66!9 3 33II3SY?<		#**#d)3q6*BCq5II56JJqMM 	"s/   H,H,H13H1	H66L:C&L55L:c                     V  FX  pVP                  4       pVP                  4        V'       g   K-  \        V4      \        J g   KB  \        P
                  ! V4       KZ  	  R # r!   )rU   r   r   ry   r   unlink)r   r   r   r   s   &&  r   close_socketsr      s@    $$&	

6j+z9IIi 	 r   c                    ^ RI Hp V P                  pV'       g   . # RV9  d   . # ^ RIHp V! 4       '       g   . # . pV F"  pWQ9   g   K  VP                  W,          4       K$  	  V# )zGet ALPN protocol list from configuration.

Returns list of ALPN protocol identifiers based on http_protocols setting.
Returns empty list if HTTP/2 is not configured or available.
)ALPN_PROTOCOL_MAPh2)is_http2_available)gunicorn.configr   http_protocolsgunicorn.http2r   r   )r
   r   r   r   alpn_protocolsprotos   &     r   _get_alpn_protocolsr      sm     2((N	 >!	 2	 N%!!"3":;   r   c                 4   a  V 3R  lpS P                  S V4      # )c                    < \         P                  ! \         P                  P                  SP                  R 7      p V P                  SP                  SP                  R7       SP                  V n	        SP                  '       d   V P                  SP                  4       \        S4      pV'       d   V P                  V4       V # ))cafile)r   r   )sslcreate_default_contextPurposeCLIENT_AUTHca_certsload_cert_chainr   r   	cert_reqsverify_modeciphersset_ciphersr   set_alpn_protocols)contextr   r
   s     r   default_ssl_context_factory0ssl_context.<locals>.default_ssl_context_factory  s    ,,S[[-D-DT]][M"nn<<<- -T2&&~6r   )ssl_context)r
   r   s   f r   r   r     s     D"=>>r   c                 f    \        V4      P                  V R VP                  VP                  R7      # )T)server_sidesuppress_ragged_eofsdo_handshake_on_connect)r   wrap_socketr   r   )r   r
   s   &&r   ssl_wrap_socketr     s8    t((59>B>W>WAEA]A] ) _ _r   c                    \        V \        P                  4      '       g   R#  V P                  4       #   \        \        P
                  3 d     R# i ; i)zGet the negotiated ALPN protocol from an SSL socket.

Returns:
    str: The negotiated protocol name ('h2', 'http/1.1', etc.)
         or None if no protocol was negotiated.
N)r   r   	SSLSocketselected_alpn_protocolrg   SSLError)
ssl_sockets   &r   get_negotiated_protocolr   $  sG     j#--000022CLL) s   4 AAc                "    \        V 4      pVR8H  # )zmCheck if HTTP/2 was negotiated on an SSL socket.

Returns:
    bool: True if HTTP/2 was negotiated via ALPN.
r   )r   )r   protocols   & r   is_http2_negotiatedr   4  s     'z2Htr   r!   )T)r0   r   r   r   r|   re   r   r   gunicornr   platformrm   r   rP   rq   ry   r   r   r   r   r   r   r   r   rC   r   r   <module>r      s   
  	  
   
  <<: :z 
  F/ / 8
>B!:?$_ r   