§
    Ètºf]  ã                   ó0   — d Z ddlmZ  G d„ d¦  «        ZdS )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                   ó6   — e Zd ZdZdZdZdZd„ Zd„ Zd„ Z	d„ Z
dS )ÚBufferingMixinz+
    Mixin which adds write buffering.
    Ng        c                 ó@   — t          j        | j        | j        ¦  «        S ©N)r   Ú	callLaterÚDELAYÚflush©Úselfs    úR/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/conch/mixin.pyÚschedulezBufferingMixin.schedule   s   € ÝÔ  ¤¨T¬ZÑ8Ô8Ð8ó    c                 ó:   — |                      | j        ¦  «         d S r   )Úresetr	   )r   Útokens     r   Ú
reschedulezBufferingMixin.reschedule   s   € Ø�Š�D”JÑÔÐÐÐr   c                 ó¾   — | j         €!g | _        |                      ¦   «         | _         n|                      | j         ¦  «         | j                             |¦  «         dS )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   ÚwritezBufferingMixin.write!   sX   € ð Ô!Ð)ØˆDŒIØ%)§]¢]¡_¤_ˆDÔ"Ð"à�OŠO˜DÔ2Ñ3Ô3Ð3ØŒ	×Ò˜ÑÔÐÐÐr   c                 ó`   — d| _         | j                             | j        ¦  «         d| _        dS )z/
        Flush the buffer immediately.
        N)r   Ú	transportÚwriteSequencer   r   s    r   r
   zBufferingMixin.flush0   s/   € ð "&ˆÔØŒ×$Ò$ T¤YÑ/Ô/Ð/ØˆŒ	ˆ	ˆ	r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r	   r   r   r   r
   © r   r   r   r      sl   € € € € € ðð ð ÐØ€Dà€Eð9ð 9ð 9ð ð  ð  ðð ð ðð ð ð ð r   r   N)r   Útwisted.internetr   r   r    r   r   ú<module>r"      sU   ðð
ð ð %Ð $Ð $Ð $Ð $Ð $ð%ð %ð %ð %ð %ñ %ô %ð %ð %ð %r   