| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python2.7/dist-packages/twisted/test/ |
Upload File : |
ó
f9=c @ s@ d d l m Z d d l m Z d d d „ ƒ YZ d „ Z d S( iÿÿÿÿ( t StringIO( t FileWrappert IOPumpc B s) e Z d Z d „ Z d „ Z d „ Z RS( sŠ Utility to pump data between clients and servers for protocol testing.
Perhaps this is a utility worthy of being in protocol.py?
c C s( | | _ | | _ | | _ | | _ d S( N( t clientt servert clientIOt serverIO( t selfR R R R ( ( s: /usr/lib/python2.7/dist-packages/twisted/test/testutils.pyt __init__ s c C s x | j ƒ r q Wd S( s, Pump until there is no more input or output.N( t pump( R ( ( s: /usr/lib/python2.7/dist-packages/twisted/test/testutils.pyt flush s c C sÒ | j j d ƒ | j j d ƒ | j j ƒ } | j j ƒ } | j j d ƒ | j j d ƒ | j j ƒ | j j ƒ x | D] } | j j | ƒ q Wx | D] } | j j | ƒ q W| sÆ | rÊ d Sd Sd S( sO Move data back and forth.
Returns whether any data was moved.
i i N( R t seekR t readt truncateR t dataReceivedR ( R t cDatat sDatat byte( ( s: /usr/lib/python2.7/dist-packages/twisted/test/testutils.pyR s
( t __name__t
__module__t __doc__R R
R ( ( ( s: /usr/lib/python2.7/dist-packages/twisted/test/testutils.pyR s c C se t ƒ } t ƒ } | j t | ƒ ƒ | j t | ƒ ƒ t | | | | ƒ } | j ƒ | j ƒ | S( s2 Take two Protocol instances and connect them.
( R t makeConnectionR R R
( R R t ciot sioR ( ( s: /usr/lib/python2.7/dist-packages/twisted/test/testutils.pyt returnConnected+ s
N( ( t cStringIOR t twisted.internet.protocolR R R ( ( ( s: /usr/lib/python2.7/dist-packages/twisted/test/testutils.pyt <module> s '