
    i                     V    d dl mZ ddlmZmZ ddlmZ ddlmZ  G d de          Z	d	S )
    )Optional   )SyncSocketStreamSyncResolver   )SyncConnector)httpc                   \    e Zd Zdee         dee         defdZdededede	j
        fd	Zd
S )HttpSyncConnectorusernamepasswordresolverc                 0    || _         || _        || _        d S )N)	_username	_password	_resolver)selfr   r   r   s       c/usr/local/lib/hermes-agent/venv/lib/python3.11/site-packages/python_socks/_connectors/http_sync.py__init__zHttpSyncConnector.__init__	   s     "!!    streamhostportreturnc                    t          j                    }t          j        ||| j        | j                  }|                    |          }|                    |           |                                }|                    |          }|S )N)r   r   r   r   )	r	   
ConnectionConnectRequestr   r   send	write_allreadreceive)r   r   r   r   connrequestdatareplys           r   connectzHttpSyncConnector.connect   s       %^^	
 
 
 yy!!{{}}#'<<#5#5r   N)__name__
__module____qualname__r   strr   r   r   intr	   ConnectReplyr&    r   r   r   r      s        "3-" 3-" 	" " " "   	
 
	     r   r   N)
typingr   _abcr   r   abcr   
_protocolsr	   r   r-   r   r   <module>r2      s          1 1 1 1 1 1 1 1                     r   