+
    Df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 U5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   