Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/twisted/protocols/__pycache__/ |
Upload File : |
o �b� � @ s. d dl mZ d dlmZ G dd� dej�ZdS )� )�BytesIO)�protocolc @ s, e Zd ZdZdZdd� Zdd� Zdd� Zd S ) �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). )NNr c C s$ t j�| |� | �� t� df| _d S )Nr )r �Protocol�makeConnection�getInitialStater � _sful_data)�self� transport� r �</usr/lib/python3/dist-packages/twisted/protocols/stateful.pyr s zStatefulProtocol.makeConnectionc C s t �)N)�NotImplementedError)r r r r r s z StatefulProtocol.getInitialStatec C s� | j \}}}|�dd� |�|� |�� }|�|� || |d krG|�|d �}||d 7 }|d |�}| jjr;d S |r?|}|| |d ks"|dkr_|�� }|�d� |�� |�|� d}|||f| _ d S )Nr � � )r �seek�write�tell�readr � disconnecting�truncate) r �data�state�buffer�offset�blen�d�next�br r r �dataReceived s, �� zStatefulProtocol.dataReceivedN)�__name__� __module__�__qualname__�__doc__r r r r r r r r r s r N)�ior �twisted.internetr r r r r r r �<module> s