403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/internet/test/test_iocp.pyc
ó
™”°Nc@s{dZddlZddlmZddlmZddlmZmZmZm	Z	m
Z
mZddlmZddl
mZddlmZy\dd	lmZmZmZdd
lmZmZmZddlmZddlmZWnek
rd
ZnXyeeeƒj ƒWne
k
r>Z!e"e!ƒZ#nXdZ#dej%fd„ƒYZ&dej%fd„ƒYZ'dS(s,
Tests for L{twisted.internet.iocpreactor}.
iÿÿÿÿN(tarray(tpack(tAF_INET6tAF_INETtSOCK_STREAMt
SOL_SOCKETterrortsocket(tverifyClass(tunittest(tmsg(tiocpsupportttcptudp(tIOCPReactortEVENTS_PER_LOOPt
KEY_NORMAL(tIReadWriteHandle(tSO_UPDATE_ACCEPT_CONTEXTs%This test only applies to IOCPReactortSupportTestscBsAeZdZd„Zd„Zd„Zedk	r?ee_nRS(sn
    Tests for L{twisted.internet.iocpreactor.iocpsupport}, low-level reactor
    implementation helpers.
    c	Cs”td|fƒt|tƒ}|j|jƒ|jdƒ|jdƒt|tƒ}|j|jƒ|jtƒy!|j	||j
ƒdfƒWn5tk
rÎ\}}|j|t
jt
jfƒnXt|tƒ}|j|jƒtdddƒ}|jdtj|jƒ|jƒ|d
ƒƒ|jtttd|jƒƒƒ|j||jƒd	 |j
ƒd	 ftj|jƒ|ƒƒd
S(s
        Create a C{SOCK_STREAM} connection to localhost using a socket with an
        address family of C{family} and assert that the result of
        L{iocpsupport.get_accept_addrs} is consistent with the result of
        C{socket.getsockname} and C{socket.getpeername}.
        sfamily = %rtiitctitPiN(Ri(R
RRt
addCleanuptclosetbindtlistentsetblockingtFalsetconnecttgetsocknameRtassertInterrnotEINPROGRESStEWOULDBLOCKRtassertEqualt_iocptaccepttfilenotNonet
setsockoptRRRtgetpeernametget_accept_addrs(	tselftfamilyt	localhosttporttclientterrnumtmessagetservertbuff((sC/usr/lib/python2.7/dist-packages/twisted/internet/test/test_iocp.pyt_acceptAddressTest&s,


! ( cCs|jtdƒdS(s
        L{iocpsupport.get_accept_addrs} returns a three-tuple of address
        information about the socket associated with the file descriptor passed
        to it.  For a connection using IPv4:

          - the first element is C{AF_INET}
          - the second element is a two-tuple of a dotted decimal notation IPv4
            address and a port number giving the peer address of the connection
          - the third element is the same type giving the host address of the
            connection
        s	127.0.0.1N(R5R(R,((sC/usr/lib/python2.7/dist-packages/twisted/internet/test/test_iocp.pyttest_ipv4AcceptAddressFscCs|jtdƒdS(s‰
        Like L{test_ipv4AcceptAddress}, but for IPv6 connections.  In this case:

          - the first element is C{AF_INET6}
          - the second element is a two-tuple of a hexadecimal IPv6 address
            literal and a port number giving the peer address of the connection
          - the third element is the same type giving the host address of the
            connection
        s::1N(R5R(R,((sC/usr/lib/python2.7/dist-packages/twisted/internet/test/test_iocp.pyttest_ipv6AcceptAddressUs
N(	t__name__t
__module__t__doc__R5R6R7tipv6SkipR(tskip(((sC/usr/lib/python2.7/dist-packages/twisted/internet/test/test_iocp.pyR!s	 		tIOCPReactorTestCasecBs#eZd„Zd„Zd„ZRS(cCs-tƒ}|jƒ|j|jdƒƒdS(sd
        Test reactor behavior (doIteration) when there are no pending time
        events.
        N(RtwakeUptfailIftdoIterationR((R,tir((sC/usr/lib/python2.7/dist-packages/twisted/internet/test/test_iocp.pyttest_noPendingTimerEventsfs	
cCs$tttjƒtttjƒdS(sY
        Verify that IOCP socket-representing classes implement IReadWriteHandle
        N(RRRt
ConnectionR
tPort(R,((sC/usr/lib/python2.7/dist-packages/twisted/internet/test/test_iocp.pyttest_reactorInterfacespscCs³ddd„ƒY}tƒ}|ƒ}tj|j|ƒ}x.ttdƒD]}|jjdt|ƒqKW|j	dƒ|j|jtƒ|j	dƒ|j|jtdƒdS(s†
        Verify that we don't lose an event when more than EVENTS_PER_LOOP
        events occur in the same reactor iteration
        tFakeFDcBs eZdZd„Zd„ZRS(icSsdS(NRF((R,((sC/usr/lib/python2.7/dist-packages/twisted/internet/test/test_iocp.pyt	logPrefixscSs|jd7_dS(Ni(tcounter(R,trctbytestevt((sC/usr/lib/python2.7/dist-packages/twisted/internet/test/test_iocp.pytcbs(R8R9RHRGRL(((sC/usr/lib/python2.7/dist-packages/twisted/internet/test/test_iocp.pyRF}s	iiN((
RR%tEventRLtrangeRR/t	postEventRR@R(R$RH(R,RFRAtfdteventt_((sC/usr/lib/python2.7/dist-packages/twisted/internet/test/test_iocp.pyttest_maxEventsPerIterationxs		

(R8R9RBRERS(((sC/usr/lib/python2.7/dist-packages/twisted/internet/test/test_iocp.pyR=es	
	((R:R!RtstructRRRRRRRtzope.interface.verifyRt
twisted.trialR	ttwisted.python.logR
ttwisted.internet.iocpreactorRR%RR
t$twisted.internet.iocpreactor.reactorRRRt'twisted.internet.iocpreactor.interfacesRt"twisted.internet.iocpreactor.constRtImportErrorR<RtetstrR;R(tTestCaseRR=(((sC/usr/lib/python2.7/dist-packages/twisted/internet/test/test_iocp.pyt<module>s*.

D

Youez - 2016 - github.com/yon3zu
LinuXploit