Ë
    oj]  ã                   ó(   — d Z ddlmZ  G d„ d«      Zy)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 Zd ZdZdZdZdZd„ Zd„ Zd„ 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ÚschedulezBufferingMixin.schedule   s   € Ü× Ñ  §¡¨T¯Z©ZÓ8Ð8ó    c                 ó:   — |j                  | j                  «       y r   )Úresetr	   )r   Útokens     r   Ú
reschedulezBufferingMixin.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   ÚwritezBufferingMixin.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
   zBufferingMixin.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"      s   ðñ
õ %÷%ò %r   