| 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 : |
ó
ê=Nc @ si d Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z m Z m Z m
Z
m Z m Z m
Z
d d l m Z d d l m Z d d l m Z m Z d e j f d „ ƒ YZ d e j f d
„ ƒ YZ d e j f d „ ƒ YZ d
e j f d „ ƒ YZ d e j f d „ ƒ YZ e j e d ƒ sGd e _ n e j! e d ƒ sed e _ n d S( sK
Tests for implementations of L{IReactorUNIX} and L{IReactorUNIXDatagram}.
iÿÿÿÿN( t
interfacest reactort protocolt errort addresst defert utils( t lockfile( t unittest( t MyServerFactoryt MyClientFactoryt FailedConnectionClientFactoryc B s e Z d „ Z d „ Z RS( c C s
| | _ d S( N( t onFail( t selfR ( ( s: /usr/lib/python2.7/dist-packages/twisted/test/test_unix.pyt __init__ s c C s | j j | ƒ d S( N( R t errback( R
t connectort reason( ( s: /usr/lib/python2.7/dist-packages/twisted/test/test_unix.pyt clientConnectionFailed s ( t __name__t
__module__R R ( ( ( s: /usr/lib/python2.7/dist-packages/twisted/test/test_unix.pyR s t UnixSocketTestCasec B sh e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d „ Z d
„ Z RS( s
Test unix sockets.
c s¾ ˆ j ƒ } ˆ j ƒ ‰ t ƒ ‰ t j ƒ } ˆ _ t j | ˆ ƒ } ˆ j | j ƒ t j t j
t j ƒ } ˆ j | j ƒ | j
ˆ ƒ | j | ƒ ‡ ‡ ‡ f d † } | j | ƒ | S( sè
The address passed to the server factory's C{buildProtocol} method and
the address returned by the connected protocol's transport's C{getPeer}
method match the address the client socket is bound to.
c sB t j ˆ ƒ } ˆ j ˆ j | g ƒ ˆ j | j j ƒ | ƒ d S( N( R t UNIXAddresst assertEqualt
peerAddressest transportt getPeer( t protot expected( R
t peernamet
serverFactory( s: /usr/lib/python2.7/dist-packages/twisted/test/test_unix.pyt
cbConnMade/ s ( t mktempR R t Deferredt protocolConnectionMadeR t
listenUNIXt
addCleanupt
stopListeningt sockett AF_UNIXt SOCK_STREAMt closet bindt connectt addCallback( R
t filenamet connMadet unixPortt
unixSocketR ( ( R
R R s: /usr/lib/python2.7/dist-packages/twisted/test/test_unix.pyt
test_peerBind s
c s· ˆ j ƒ ‰ t ƒ } t j ƒ } | | _ t j ˆ | ƒ } ˆ j | j ƒ t ƒ ‰ t j ƒ } | ˆ _ t j
ˆ ˆ ƒ } t j | | g ƒ } ‡ ‡ ‡ f d † } | j | ƒ | S( sŠ
L{IReactorUNIX.connectUNIX} can be used to connect a client to a server
started with L{IReactorUNIX.listenUNIX}.
c sI | \ } } ˆ j ˆ j t j ˆ ƒ g ƒ | j j ƒ | j j ƒ d S( N( R R R R R t loseConnection( t .0t serverProtocolt clientProtocol( R
R- t
clientFactory( s: /usr/lib/python2.7/dist-packages/twisted/test/test_unix.pyt allConnectedG s
(
R R R R! R"