| Server IP : 178.128.116.179 / Your IP : 216.73.216.206 Web Server : nginx/1.30.3 System : Linux glamautowash 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/twisted/conch/__pycache__/ |
Upload File : |
�
oj] � �( � d Z ddlmZ G d� d� Zy)z�
Experimental optimization
This module provides a single mixin class which allows protocols to
collapse numerous small writes into a single larger one.
@author: Jp Calderone
� )�reactorc �4 � e Zd ZdZdZdZdZd� Zd� Zd� Z d� Z
y)�BufferingMixinz+
Mixin which adds write buffering.
Ng c �V � t j | j | j � S �N)r � callLater�DELAY�flush��selfs �5/usr/lib/python3/dist-packages/twisted/conch/mixin.py�schedulezBufferingMixin.schedule s � �� � ����T�Z�Z�8�8� c �: � |j | j � y r )�resetr )r �tokens r
�
reschedulezBufferingMixin.reschedule s � �
���D�J�J�r c �� � | j �g | _ | j � | _ n| j | j � | j j |� y)a
Buffer some bytes to be written soon.
Every call to this function delays the real write by C{self.DELAY}
seconds. When the delay expires, all collected bytes are written
to the underlying transport using L{ITransport.writeSequence}.
N)�_delayedWriteCall�datar r �append)r r s r
�writezBufferingMixin.write! sI � � �!�!�)��D�I�%)�]�]�_�D�"��O�O�D�2�2�3�� � ����r c �j � d| _ | j j | j � d| _ y)z/
Flush the buffer immediately.
N)r � transport�
writeSequencer r s r
r
zBufferingMixin.flush0 s) � � "&������$�$�T�Y�Y�/��� r )�__name__�
__module__�__qualname__�__doc__r r r r r r r
� r r
r r s- � �� ���D��E�9� �
�r r N)r �twisted.internetr r r r r
�<module>r"