Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 107

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 234

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 235

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 236

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 237

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 238

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 239
U i_~N@shdZddlZddlZddlZddlZddlZddlZddlmZm Z m Z m Z m Z m Z mZmZmZmZmZmZmZee e eeeehZzeWnek riZYnXddZGdddeZeeefZdd Zd d Z d d Z!ddZ"d&ddZ#d'ddZ$e$Z%d(ddZ&GdddZ'Gddde'Z(ddZ)d)dd Z*ej+d!krdGd"d#d#Z,Gd$d%d%e'Z-dS)*aBasic infrastructure for asynchronous socket service clients and servers. There are only two ways to have a program on a single processor do "more than one thing at a time". Multi-threaded programming is the simplest and most popular way to do it, but there is another very different technique, that lets you have nearly all the advantages of multi-threading, without actually using multiple threads. it's really only practical if your program is largely I/O bound. If your program is CPU bound, then pre-emptive scheduled threads are probably what you really need. Network servers are rarely CPU-bound, however. If your operating system supports the select() system call in its I/O library (and nearly all do), then you can use it to juggle multiple communication channels at once; doing other work while your I/O is taking place in the "background." Although this strategy can seem strange and complex, especially at first, it is in many ways easier to understand and control than multi-threaded programming. The module documented here solves many of the difficult problems for you, making the task of building sophisticated high-performance network servers and clients a snap. N) EALREADY EINPROGRESS EWOULDBLOCK ECONNRESETEINVALENOTCONN ESHUTDOWNEISCONNEBADF ECONNABORTEDEPIPEEAGAIN errorcodec CsHz t|WStttfk rB|tkr6t|YSd|YSXdS)NzUnknown error %s)osstrerror ValueError OverflowError NameErrorr)errr'/opt/python38/lib/python3.8/asyncore.py _strerrorDs   rc@s eZdZdS)ExitNowN)__name__ __module__ __qualname__rrrrrLsrcCs:z |Wn(tk r"Yn|YnXdSN)handle_read_event_reraised_exceptions handle_errorobjrrrreadQs  r"cCs:z |Wn(tk r"Yn|YnXdSr)handle_write_eventrrr rrrwriteYs  r$cCs:z |Wn(tk r"Yn|YnXdSr)handle_expt_eventrrr rrr _exceptionas  r&c CszX|tj@r||tj@r&||tj@r8||tjtjBtj B@rV| Wnht k r}z$|j dt kr|n| W5d}~XYn(tk rYn|YnXdSNr)selectPOLLINrPOLLOUTr#POLLPRIr%POLLHUPPOLLERRPOLLNVAL handle_closeOSErrorargs _DISCONNECTEDrr)r!flagserrr readwriteis"     r5c Cs<|dkr t}|r8g}g}g}t|D]L\}}|}|}|rP|||rd|jsd|||sl|r*||q*g|kr|kr|krnnt|dSt ||||\}}}|D] }| |}|dkrqt |q|D]"}| |}|dkrqt |q|D]&}| |}|dkr,qt |qdSr) socket_maplistitemsreadablewritableappend acceptingtimesleepr(getr"r$r&) timeoutmaprwr4fdr!Zis_rZis_wrrrpoll}sD    "        rFcCs|dkr t}|dk r t|d}t}|rt|D]L\}}d}|r\|tjtjBO}| rt|j st|tj O}|r8| ||q8||}|D]&\}}| |}|dkrqt||qdS)Nir)r7intr(rFr8r9r:r)r+r;r=r*registerr@r5)rArBZpollsterrEr!r3rCrrrpoll2s(     rI>@FcCsb|dkr t}|r ttdr t}nt}|dkr>|r^|||q,n |r^|dkr^||||d}q>dS)NrFr)r7hasattrr(rIrF)rAZuse_pollrBcountZpoll_funrrrloops  rNc@s2eZdZdZdZdZdZdZdZe dhZ dAddZ ddZ dBdd Z dCd d Zejejfd d ZdDddZddZddZddZddZddZddZddZddZd d!Zd"d#Zd$d%ZdEd'd(Zd)d*Z d+d,Z!d-d.Z"d/d0Z#d1d2Z$d3d4Z%d5d6Z&d7d8Z'd9d:Z(d;d<Z)d=d>Z*d?d@Z+dS)F dispatcherFNwarningc Cs|dkrt|_n||_d|_|r|d|||d|_z||_Wqtk r}z*|j dt t fkrvd|_n | |W5d}~XYqXnd|_ dSNrTF)r7_map_fileno setblocking set_socket connected getpeernameaddrr0r1rr del_channelsocket)selfsockrBrrrr__init__s    zdispatcher.__init__cCs|jjd|jjg}|jr.|jr.|dn|jr>|d|jdk rz|d|jWn$tk r|t|jYnXdd |t |fS)N.Z listeningrVz%s:%dz <%s at %#x> ) __class__rrr=rXr<rV TypeErrorreprjoinid)r[statusrrr__repr__s    zdispatcher.__repr__cCs|dkr|j}|||j<dSr)rRrS)r[rBrrr add_channel szdispatcher.add_channelcCs,|j}|dkr|j}||kr"||=d|_dSr)rSrR)r[rBrErrrrYs zdispatcher.del_channelcCs.||f|_t||}|d||dSr')Zfamily_and_typerZrTrU)r[familytyper\rrr create_sockets   zdispatcher.create_socketcCs||_||_||dSr)rZfilenorSrgr[r\rBrrrrUs zdispatcher.set_socketcCsDz*|jtjtj|jtjtjdBWntk r>YnXdS)NrK)rZ setsockopt SOL_SOCKET SO_REUSEADDR getsockoptr0r[rrrset_reuse_addr#s zdispatcher.set_reuse_addrcCsdSNTrrqrrrr:4szdispatcher.readablecCsdSrsrrqrrrr;7szdispatcher.writablecCs(d|_tjdkr|dkrd}|j|S)NTnt)r=rnamerZlisten)r[numrrrrw>szdispatcher.listencCs||_|j|Sr)rXrZbind)r[rXrrrryDszdispatcher.bindcCspd|_d|_|j|}|tttfks8|tkrBtj dkrB||_ dS|dt fkr^||_ | nt |t|dS)NFTrtr)rV connectingrZ connect_exrrrrrrvrXr handle_connect_eventr0r)r[addressrrrrconnectHs   zdispatcher.connectc Csvz|j\}}WnVtk r(YdStk rh}z$|jdtttfkrVWY dSW5d}~XYn X||fSdSr')rZacceptrar0r1rr r )r[connrXwhyrrrrVs zdispatcher.acceptc Cstz|j|}|WStk rn}z>|jdtkrz:uncaptured python exception, closing channel %s (%s:%s %s)error)compact_tracebackrbrdrr/)r[niltvtbinfoZ self_reprrrrrs  zdispatcher.handle_errorcCs|dddS)Nz!unhandled incoming priority eventrPrrqrrrrszdispatcher.handle_exptcCs|dddS)Nzunhandled read eventrPrrqrrrrszdispatcher.handle_readcCs|dddS)Nzunhandled write eventrPrrqrrrrszdispatcher.handle_writecCs|dddS)Nzunhandled connect eventrPrrqrrrrszdispatcher.handle_connectcCs|}|dk r|j|dSr)rhandle_accepted)r[Zpairrrrrszdispatcher.handle_acceptcCs||dddS)Nzunhandled accepted eventrP)rr)r[r\rXrrrrszdispatcher.handle_acceptedcCs|dd|dS)Nzunhandled close eventrP)rrrqrrrr/s zdispatcher.handle_close)NN)N)N)N)r),rrrdebugrVr=rzclosingrX frozensetrr]rfrgrYrZAF_INET SOCK_STREAMrjrUrrr:r;rwryr~rrrrrrrr|r#r%rrrrrrrr/rrrrrOsJ         rOc@s6eZdZd ddZddZddZdd Zd d ZdS) dispatcher_with_sendNcCst|||d|_dS)Nr)rOr] out_bufferrlrrrr]szdispatcher_with_send.__init__cCs.d}t||jdd}|j|d|_dS)Nri)rOrr)r[Znum_sentrrr initiate_sendsz"dispatcher_with_send.initiate_sendcCs |dSr)rrqrrrrsz!dispatcher_with_send.handle_writecCs|j pt|jSr)rVlenrrqrrrr;szdispatcher_with_send.writablecCs0|jr|dt||j||_|dS)Nz sending %s)rrrbrr)r[rrrrr s zdispatcher_with_send.send)NN)rrrr]rrr;rrrrrrs  rcCst\}}}g}|std|rL||jjj|jjjt|j f|j }q~|d\}}}d dd|D}|||f|||fS)Nztraceback does not existr_cSsg|] }d|qS)z [%s|%s|%s]r).0xrrr &sz%compact_traceback..) rexc_infoAssertionErrorr<tb_framef_code co_filenameco_namer tb_linenotb_nextrc)rrtbrfilefunctionlinerrrrrsrc Cs|dkr t}t|D]n}z |Wqtk r`}z|jdtkrJn|sPW5d}~XYqtk rtYq|sYqXq|dSr') r7r8valuesrr0r1r rclear)rBZ ignore_allrrrr close_all)s   rposixc@sNeZdZddZddZddZddZdd d ZeZeZ d d Z ddZ d S) file_wrappercCst||_dSr)rduprEr[rErrrr]Nszfile_wrapper.__init__cCs*|jdkrtjd|t|d|dS)Nrzunclosed file %r)source)rEwarningswarnResourceWarningrrqrrr__del__Qs   zfile_wrapper.__del__cGstj|jf|Sr)rr"rEr[r1rrrrWszfile_wrapper.recvcGstj|jf|Sr)rr$rErrrrrZszfile_wrapper.sendNcCs(|tjkr|tjkr|sdStddS)Nrz-Only asyncore specific behaviour implemented.)rZrnrNotImplementedError)r[levelZoptnamebuflenrrrrp]s zfile_wrapper.getsockoptcCs(|jdkrdS|j}d|_t|dS)Nrr)rErrrrrrrhs  zfile_wrapper.closecCs|jSr)rErqrrrrkoszfile_wrapper.fileno)N) rrrr]rrrrpr"r$rrkrrrrrIs rc@seZdZdddZddZdS)file_dispatcherNcCsPt|d|d|_z |}Wntk r4YnX||t|ddS)NTF)rOr]rVrkAttributeErrorset_filer set_blocking)r[rErBrrrr]ts  zfile_dispatcher.__init__cCs"t||_|j|_|dSr)rrZrkrSrgrrrrrs  zfile_dispatcher.set_file)N)rrrr]rrrrrrrs r)r6N)r6N)rJFNN)NF).__doc__r(rZrr>rrerrnorrrrrrrr r r r r rrr2r7rr ExceptionrKeyboardInterrupt SystemExitrr"r$r&r5rFrIZpoll3rNrOrrrrvrrrrrrsD<    '  *  )