+
    üÐjf  ã                   óž   € R t ^ RIHtHt ^ RIt ! R R]P                  P                  4      t ! R R]P                  P                  4      t	R# )z0
Interfaces used by the PROXY protocol modules.
)ÚTupleÚUnionNc                   ó¼   € ] tR t^tRt]P                  P                  R4      t]P                  P                  R4      t	]P                  P                  R4      t
RtR# )Ú
IProxyInfoz0
Data container for PROXY protocol header data.
z<The raw byestring that represents the PROXY protocol header.zNAn L{twisted.internet.interfaces.IAddress} representing the connection source.zSAn L{twisted.internet.interfaces.IAddress} representing the connection destination.© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚzopeÚ	interfaceÚ	AttributeÚheaderÚsourceÚdestinationÚ__static_attributes__r   ó    ÚG/usr/lib/python3/dist-packages/twisted/protocols/haproxy/_interfaces.pyr   r      sV   † ñð �^‰^×%Ñ%ØFó€Fð �^‰^×%Ñ%ð	ó€Fð —.‘.×*Ñ*ð	"ó„Kr   r   c                   óH   a € ] tR t^t o RtV 3R lR ltV 3R lR ltRtV tR# )ÚIProxyParserz7
Streaming parser that handles PROXY protocol headers.
c                ó`   <€ V ^8„  d   QhRS[ RS[S[S[S[ 3,          S[R,          3,          /# )é   ÚdataÚreturn)NN)Úbytesr   r   r   )ÚformatÚ__classdict__s   "€r   Ú__annotate__ÚIProxyParser.__annotate__$   s4   ø€ ÷ ñ ‘5ð ™U¡5©±UÐ):Õ#;¹UÀ:Õ=NÐ#NÕOñ r   c                ó   € R# )aŒ  
Consume a chunk of data and attempt to parse it.

@param data: A bytestring.
@type data: bytes

@return: A two-tuple containing, in order, an L{IProxyInfo} and any
    bytes fed to the parser that followed the end of the header.  Both
    of these values are None until a complete header is parsed.

@raises InvalidProxyHeader: If the bytes fed to the parser create an
    invalid PROXY header.
Nr   )r   s   &r   ÚfeedÚIProxyParser.feed$   ó   ‚ r   c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   Úliner   )r   r   )r   r   s   "€r   r   r   3   s   ø€ ÷ ñ ‘Eð ™jñ r   c                ó   € R# )a:  
Parse a bytestring as a full PROXY protocol header line.

@param line: A bytestring that represents a valid HAProxy PROXY
    protocol header line.
@type line: bytes

@return: An L{IProxyInfo} containing the parsed data.

@raises InvalidProxyHeader: If the bytestring does not represent a
    valid PROXY header.
Nr   )r%   s   &r   ÚparseÚIProxyParser.parse3   r#   r   r   N)	r   r   r	   r
   r   r!   r'   r   Ú__classdictcell__)r   s   @r   r   r      s   ø‡ € ñ÷ð ÷ö r   r   )
r   Útypingr   r   Úzope.interfacer   r   Ú	Interfacer   r   r   r   r   Ú<module>r-      s>   ðñ
÷  ã ô�—‘×)Ñ)ô ô$ �4—>‘>×+Ñ+ö  r   