| 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/internet/test/ |
Upload File : |
ó
B±Nc @ sÿ d Z d d l m Z d d l m Z d d l m Z m Z d d l m Z d d l
m Z m Z m
Z
d d l m Z m Z d d l m Z m Z d „ Z e Z d
e f d „ ƒ YZ d e f d
„ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d S( s?
Various helpers for tests for connection-oriented transports.
iÿÿÿÿ( t collect( t ref( t contextt log( t fullyQualifiedName( t ILogContextt msgt err( t Deferredt
gatherResults( t
ServerFactoryt Protocolc C s t ƒ } | | _ | S( s
Helper function which returns a L{ServerFactory} which will build instances
of C{protocol}.
@param protocol: A callable which returns an L{IProtocol} provider to be
used to handle connections to the port the returned factory listens on.
( R
t protocol( R t factory( ( sJ /usr/lib/python2.7/dist-packages/twisted/internet/test/connectionmixins.pyt serverFactoryFor s t _AcceptOneClientc B s e Z d Z d „ Z d „ Z RS( sM
This factory fires a L{Deferred} with a protocol instance shortly after it
is constructed (hopefully long enough afterwards so that it has been
connected to a transport).
@ivar reactor: The reactor used to schedule the I{shortly}.
@ivar result: A L{Deferred} which will be fired with the protocol instance.
c C s | | _ | | _ d S( N( t reactort result( t selfR R ( ( sJ /usr/lib/python2.7/dist-packages/twisted/internet/test/connectionmixins.pyt __init__) s c C s2 t j | | ƒ } | j j d | j j | ƒ | S( Ni ( R
t
buildProtocolR t callLaterR t callback( R t addrR ( ( sJ /usr/lib/python2.7/dist-packages/twisted/internet/test/connectionmixins.pyR . s ( t __name__t
__module__t __doc__R R ( ( ( sJ /usr/lib/python2.7/dist-packages/twisted/internet/test/connectionmixins.pyR s t ClosingLaterProtocolc B s2 e Z d Z d „ Z d „ Z d „ Z d „ Z RS( sÕ
ClosingLaterProtocol exchanges one byte with its peer and then disconnects
itself. This is mostly a work-around for the fact that connectionMade is
called before the SSL handshake has completed.
c C s d | _ | | _ d S( N( t Nonet lostConnectionReasont onConnectionLost( R R ( ( sJ /usr/lib/python2.7/dist-packages/twisted/internet/test/connectionmixins.pyR ; s c C s t d ƒ d S( Ns# ClosingLaterProtocol.connectionMade( R ( R ( ( sJ /usr/lib/python2.7/dist-packages/twisted/internet/test/connectionmixins.pyt connectionMade@ s c C s"