Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
§
àÀf2- ã ó� — d Z ddlZddlmZ ddlmZ dZ eeed¬¦ « G d„ d ej ¦ « Z G d
„ d¦ « Z
d„ ZdS )
a¥ A class supporting chat-style (command/response) protocols.
This class adds support for 'chat' style protocols - where one side
sends a 'command', and the other sends a response (examples would be
the common internet protocols - smtp, nntp, ftp, etc..).
The handle_read() method looks at the input stream for the current
'terminator' (usually '\r\n' for single-line responses, '\r\n.\r\n'
for multi-line output), calling self.found_terminator() on its
receipt.
for example:
Say you build an async nntp client using this class. At the start
of the connection, you'll have self.terminator set to '\r\n', in
order to process the single-line greeting. Just before issuing a
'LIST' command you'll set it to '\r\n.\r\n'. The output of the LIST
command will be accumulated (using your own 'collect_incoming_data'
method) up to the terminator, and then control will be returned to
you - by calling your self.found_terminator() method.
é N)Údeque)Ú_deprecatedznThe {name} module is deprecated and will be removed in Python {remove}. The recommended replacement is asyncio)é é )Úremovec óŠ — e Zd ZdZdZdZdZdZdd„Zd„ Z d„ Z
d „ Zd
„ Zd„ Z
d„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )Ú
async_chatz‡This is an abstract class. You must derive from this class, and add
the two methods collect_incoming_data() and found_terminator()i r zlatin-1Nc óŠ — d| _ g | _ t ¦ « | _ t j | ||¦ « d S ©Nó )Úac_in_bufferÚincomingr Ú
producer_fifoÚasyncoreÚ
dispatcherÚ__init__)ÚselfÚsockÚmaps ú//opt/alt/python311/lib64/python3.11/asynchat.pyr zasync_chat.__init__J sB € àˆÔð
ˆŒ
õ #™WœWˆÔÝÔ×$Ò$ T¨4°Ñ5Ô5Ð5Ð5Ð5r c ó — t d¦ « ‚©Nzmust be implemented in subclass©ÚNotImplementedError©r Údatas r Úcollect_incoming_dataz async_chat.collect_incoming_dataX ó € Ý!Ð"CÑDÔDÐDr c ó: — | j |¦ « d S ©N)r Úappendr s r Ú_collect_incoming_dataz!async_chat._collect_incoming_data[ s € ØŒ
×Ò˜TÑ"Ô"Ð"Ð"Ð"r c óN — d | j ¦ « }| j d d …= |S r )Újoinr )r Úds r Ú _get_datazasync_chat._get_data^ s( € Ø�HŠH�T”]Ñ#Ô#ˆØŒM˜!˜!˜!ÐØˆr c ó — t d¦ « ‚r r ©r s r Úfound_terminatorzasync_chat.found_terminatorc r r c óÌ — t |t ¦ « r| j rt || j ¦ « }n*t |t
¦ « r|dk rt
d¦ « ‚|| _ dS )zdSet the input delimiter.
Can be a fixed string of any length, an integer, or None.
r z-the number of received bytes must be positiveN)Ú
isinstanceÚstrÚuse_encodingÚbytesÚencodingÚintÚ
ValueErrorÚ
terminator)r Úterms r Úset_terminatorzasync_chat.set_terminatorf sj € õ
�d�CÑ Ô ð N TÔ%6ð Nݘ˜tœ}Ñ-Ô-ˆDˆDÝ
˜�cÑ
"Ô
"ð N t¨a¢x xÝÐLÑMÔMÐM؈Œˆˆr c ó — | j S r )r2 r( s r Úget_terminatorzasync_chat.get_terminatorq s
€ ØŒÐr c ó — | | j ¦ « }n1# t $ r Y d S t $ r | ¦ « Y d S w xY wt |t ¦ « r!| j rt t | j ¦ « }| j
|z | _
| j
�rót | j
¦ « }| ¦ « }|s#|
| j
¦ « d| _
�nœt |t ¦ « rŒ|}||k r2|
| j
¦ « d| _
| j |z
| _ �nM|
| j
d |… ¦ « | j
|d … | _
d| _ | ¦ « nût |¦ « }| j
|¦ « }|dk rT|dk r"|
| j
d |… ¦ « | j
||z d … | _
| ¦ « nxt% | j
|¦ « }|r@||k r8|
| j
d | … ¦ « | j
| d … | _
d S |
| j
¦ « d| _
| j
�°ñd S d S )Nr r éÿÿÿÿ)ÚrecvÚac_in_buffer_sizeÚBlockingIOErrorÚOSErrorÚhandle_errorr+ r, r- r. r/ r
Úlenr6 r r0 r2 r) ÚfindÚfind_prefix_at_end)r r Úlbr2 ÚnÚterminator_lenÚindexs r Úhandle_readzasync_chat.handle_ready sÎ € ð Ø—9’9˜TÔ3Ñ4Ô4ˆDˆDøÝð ð ð ØˆFˆFÝð ð ð Ø×ÒÑÔÐØˆFˆFð øøøõ �d�CÑ Ô ð - TÔ%6ð -Ý�˜dœmÑ,Ô,ˆDØ Ô-°Ñ4ˆÔð Ôñ 3 0Ý�TÔ&Ñ'Ô'ˆBØ×,Ò,Ñ.Ô.ˆJØð 0
0à×*Ò*¨4Ô+<Ñ=Ô=Ð=Ø$'�Ô!Ñ!ݘJÑ,Ô,ð ,
0à�ؘ’6�6Ø×.Ò.¨tÔ/@ÑAÔAÐAØ(+�DÔ%Ø&*¤o¸Ñ&:�D”O‘Oà×.Ò.¨tÔ/@ÀÀ!ÀÔ/DÑEÔEÐEØ(,Ô(9¸!¸"¸"Ô(=�DÔ%Ø&'�D”OØ×)Ò)Ñ+Ô+Ð+Ð+õ "% Z¡¤�ØÔ)×.Ò.¨zÑ:Ô:�ؘB’;�;à˜q’y�yð ×2Ò2°4Ô3DÀVÀeÀVÔ3LÑMÔMÐMØ(,Ô(9¸%ÀÑ:NÐ:OÐ:OÔ(P�DÔ%ð ×)Ò)Ñ+Ô+Ð+Ð+õ /¨tÔ/@À*ÑMÔM�EØð 0Ø Bš;˜;à ×6Ò6°tÔ7HÈÈ5È&ÈÔ7QÑRÔRÐRØ04Ô0AÀ5À&À'À'Ô0J˜DÔ-ؘð ×2Ò2°4Ô3DÑEÔEÐEØ,/˜Ô)ðg Ôñ 3 0ð 3 0ð 3 0ð 3 0ð 3 0s ‚ �
AªAÁ
Ac ó. — | ¦ « d S r )Ú
initiate_sendr( s r Úhandle_writezasync_chat.handle_writeÁ s € Ø×ÒÑÔÐÐÐr c ó. — | ¦ « d S r )Úcloser( s r Úhandle_closezasync_chat.handle_closeÄ s € Ø�
Š
‰Œˆˆˆr c ó¢ — t |t t t f¦ « st dt |¦ « ¦ « ‚| j }t |¦ « |k rGt dt |¦ « |¦ « D ]'}| j
||||z … ¦ « Œ(n| j
|¦ « | ¦ « d S )Nz#data argument must be byte-ish (%r)r )r+ r. Ú bytearrayÚ
memoryviewÚ TypeErrorÚtypeÚac_out_buffer_sizer> Úranger r! rG )r r ÚsabsÚis r Úpushzasync_chat.pushÇ sÏ € ݘ$¥ µ:Ð >Ñ?Ô?ð (ÝÐAÝ ™JœJñ(ô (ð
(àÔ&ˆÝˆt‰9Œ9�tÒÐݘ1�c $™iœi¨Ñ.Ô.ð
:ð
:�ØÔ"×)Ò)¨$¨q°°4±¨x¬.Ñ9Ô9Ð9Ð9ð
:ð
Ô×%Ò% dÑ+Ô+Ð+Ø×ÒÑÔÐÐÐr c ób — | j |¦ « | ¦ « d S r )r r! rG )r Úproducers r Úpush_with_producerzasync_chat.push_with_producerÓ s1 € ØÔ×!Ò! (Ñ+Ô+Ð+Ø×ÒÑÔÐÐÐr c ó — dS )z4predicate for inclusion in the readable for select()é © r( s r Úreadablezasync_chat.readable× s € ð ˆqr c ó — | j p| j S )z4predicate for inclusion in the writable for select())r Ú connectedr( s r Úwritablezasync_chat.writableß s € àÔ!Ð9¨$¬.Ð&8Ð9r c ó: — | j d¦ « dS )zAautomatically close this channel once the outgoing queue is emptyN)r r! r( s r Úclose_when_donezasync_chat.close_when_doneã s € àÔ×!Ò! $Ñ'Ô'Ð'Ð'Ð'r c ó¤ — | j �rE| j �r?| j d }|s | j d= |€| ¦ « d S | j } |d |… }nI# t $ r< | ¦ « }|r| j |¦ « n| j d= Y Œ—w xY wt |t ¦ « r| j rt || j ¦ « } | |¦ « }n%# t $ r | ¦ « Y d S w xY w|rA|t |¦ « k s|t |¦ « k r||d … | j d<