HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/usr/lib/python3/dist-packages/twisted/conch/__pycache__/mixin.cpython-38.pyc
U


W[^�@s"dZddlmZGdd�d�ZdS)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@s<eZdZdZdZdZdZdd�Zdd�Zdd	�Z	d
d�Z
dS)�BufferingMixinz+
    Mixin which adds write buffering.
    NgcCst�|j|j�S�N)rZ	callLater�DELAY�flush��self�r	�5/usr/lib/python3/dist-packages/twisted/conch/mixin.py�scheduleszBufferingMixin.schedulecCs|�|j�dSr)�resetr)r�tokenr	r	r
�
rescheduleszBufferingMixin.reschedulecCs8|jdkrg|_|��|_n|�|j�|j�|�dS)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�datarr�append)rrr	r	r
�write!s

zBufferingMixin.writecCsd|_|j�|j�d|_dS)z/
        Flush the buffer immediately.
        N)rZ	transportZ
writeSequencerrr	r	r
r1szBufferingMixin.flush)�__name__�
__module__�__qualname__�__doc__rrrrrrrr	r	r	r
rsrN)rZtwisted.internetrrr	r	r	r
�<module>s