/usr/lib/python3/dist-packages/twisted/protocols/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/protocols/__pycache__/portforward.cpython-310.pyc (3042B)
o
bC @ sv d Z ddlmZ ddlmZ G dd dejZG dd deZG dd d ejZ G d
d deZ
G dd
d
ejZdS )z
A simple port forwarder.
)protocol)logc @ s, e Zd ZdZdZdd Zdd Zdd ZdS ) ProxyTNc C
|| _ d S N)peer)selfr r ?/usr/lib/python3/dist-packages/twisted/protocols/portforward.pysetPeer
z
Proxy.setPeerc C s> | j d ur| j j d | _ d S | jrtd| d S d S )NzUnable to connect to peer: )r transportloseConnectionnoisyr msg)r reasonr r r
connectionLost s
zProxy.connectionLostc C s | j j| d S r )r r
write)r datar r r
dataReceived s zProxy.dataReceived)__name__
__module____qualname__r r r r r r r r r
r
s r c @ s e Zd Zdd ZdS )ProxyClientc C s@ | j | | j| j jd | j j| jd | j j d S )NT)r r r
registerProducerresumeProducing)r r r r
connectionMade! s zProxyClient.connectionMadeN)r r r r r r r r
r s r c @ s( e Zd ZeZdd Zdd Zdd ZdS )ProxyClientFactoryc C r r )server)r r r r r
setServer3 r zProxyClientFactory.setServerc O s* t jj| g|R i |}|| j |S r )r
ClientFactory
buildProtocolr r )r argskwprotr r r
r! 6 s z ProxyClientFactory.buildProtocolc C s | j j d S r )r r
r )r connectorr r r r
clientConnectionFailed; s z)ProxyClientFactory.clientConnectionFailedN)r r r r r r r! r&