Files
aitsc/.venv/Lib/site-packages/engineio/__pycache__/async_server.cpython-312.pyc

238 lines
30 KiB
Plaintext
Raw Normal View History

2025-02-23 09:07:52 +08:00
<EFBFBD>
W0<57>gk<00><00>|<00>ddlZddlZddlmZddlmZddlmZddlmZe<07>ZGd<07>dej<00>Z
y) <09>N<>)<01> base_server)<01>
exceptions)<01>packet)<01> async_socketc<00><><00>eZdZdZd<02>Zd<03>Zdd<04>Zd<05>Zd<06>Zd<07>Z d<08>Z
d <09>Z dd <0B>Z d <0C>Z d <0A>Zd<0E>Zdd<0F>Zd<10>Zd<11>Zd<12>Zd<13>Zdd<14>Zd<15>Zd<16>Zy
)<1A> AsyncServerawAn Engine.IO server for asyncio.
This class implements a fully compliant Engine.IO web server with support
for websocket and long-polling transports, compatible with the asyncio
framework on Python 3.5 or newer.
:param async_mode: The asynchronous model to use. See the Deployment
section in the documentation for a description of the
available options. Valid async modes are "aiohttp",
"sanic", "tornado" and "asgi". If this argument is not
given, "aiohttp" is tried first, followed by "sanic",
"tornado", and finally "asgi". The first async mode that
has all its dependencies installed is the one that is
chosen.
:param ping_interval: The interval in seconds at which the server pings
the client. The default is 25 seconds. For advanced
control, a two element tuple can be given, where
the first number is the ping interval and the second
is a grace period added by the server.
:param ping_timeout: The time in seconds that the client waits for the
server to respond before disconnecting. The default
is 20 seconds.
:param max_http_buffer_size: The maximum size that is accepted for incoming
messages. The default is 1,000,000 bytes. In
spite of its name, the value set in this
argument is enforced for HTTP long-polling and
WebSocket connections.
:param allow_upgrades: Whether to allow transport upgrades or not.
:param http_compression: Whether to compress packages when using the
polling transport.
:param compression_threshold: Only compress messages when their byte size
is greater than this value.
:param cookie: If set to a string, it is the name of the HTTP cookie the
server sends back tot he client containing the client
session id. If set to a dictionary, the ``'name'`` key
contains the cookie name and other keys define cookie
attributes, where the value of each attribute can be a
string, a callable with no arguments, or a boolean. If set
to ``None`` (the default), a cookie is not sent to the
client.
:param cors_allowed_origins: Origin or list of origins that are allowed to
connect to this server. Only the same origin
is allowed by default. Set this argument to
``'*'`` to allow all origins, or to ``[]`` to
disable CORS handling.
:param cors_credentials: Whether credentials (cookies, authentication) are
allowed in requests to this server.
:param logger: To enable logging set to ``True`` or pass a logger object to
use. To disable logging set to ``False``. Note that fatal
errors are logged even when ``logger`` is ``False``.
:param json: An alternative json module to use for encoding and decoding
packets. Custom json modules must have ``dumps`` and ``loads``
functions that are compatible with the standard library
versions.
:param async_handlers: If set to ``True``, run message event handlers in
non-blocking threads. To run handlers synchronously,
set to ``False``. The default is ``True``.
:param monitor_clients: If set to ``True``, a background task will ensure
inactive clients are closed. Set to ``False`` to
disable the monitoring task (not recommended). The
default is ``True``.
:param transports: The list of allowed transports. Valid transports
are ``'polling'`` and ``'websocket'``. Defaults to
``['polling', 'websocket']``.
:param kwargs: Reserved for future extensions, any additional parameters
given as keyword arguments will be silently ignored.
c<00><00>y)NT<4E><00><01>selfs <20>?D:\wxxcx\tsccc\.venv\Lib\site-packages\engineio/async_server.py<70>is_asyncio_basedzAsyncServer.is_asyncio_basedSs<00><00><13>c<00>
<00>gd<01>S)N)<04>aiohttp<74>sanic<69>tornado<64>asgir r s r<00> async_modeszAsyncServer.async_modesVs<00><00>6<>6rc<00>\<00>|jd<01>}|jd||d|<02>d<01><03>y)z.Attach the Engine.IO server to an application.<2E>/<2F> create_routeN)<02>strip<69>_async)r <00>app<70> engineio_paths r<00>attachzAsyncServer.attachYs2<00><00>%<25>+<2B>+<2B>C<EFBFBD>0<> <0A>#<23><04> <0B> <0B>N<EFBFBD>#<23>C<EFBFBD><14><11>=<3D>/<2F><11>/C<>Drc<00><00><>K<00>|j|tjtj|<02><01><00><00>d{<00><02><03>y7<00><05>w)aiSend a message to a client.
:param sid: The session id of the recipient client.
:param data: The data to send to the client. Data can be of type
``str``, ``bytes``, ``list`` or ``dict``. If a ``list``
or ``dict``, the data will be serialized as JSON.
Note: this method is a coroutine.
)<01>dataN)<04> send_packetr<00>Packet<65>MESSAGE)r <00>sidr s r<00>sendzAsyncServer.send^s-<00><00><><00><13><1E><1E>s<EFBFBD>F<EFBFBD>M<EFBFBD>M<EFBFBD>&<26>.<2E>.<2E>t<EFBFBD>$L<>M<>M<>M<>s<00>9A<01>A<04>Ac<00><00><>K<00> |j|<01>}|j |<02><00>d{<00><02><03>y#t$r|jjd|<01>YywxYw7<00>0<EFBFBD>w)z<>Send a raw packet to a client.
:param sid: The session id of the recipient client.
:param pkt: The packet to send to the client.
Note: this method is a coroutine.
zCannot send to sid %sN)<05> _get_socket<65>KeyError<6F>logger<65>warningr%)r r$<00>pkt<6B>sockets rr!zAsyncServer.send_packetjs]<00><00><><00> <13><19>%<25>%<25>c<EFBFBD>*<2A>F<EFBFBD>
<15>k<EFBFBD>k<EFBFBD>#<23><1E><1E><1E><> <18> <13> <10>K<EFBFBD>K<EFBFBD> <1F> <1F> 7<><13> =<3D> <12> <13><> <1F>s/<00>A<01>/<00>A<01>A<04>A<01>%A<03>A<01>A<03>Ac<00><00>DK<00>|j|<01>}|jS<00>w)a;Return the user session for a client.
:param sid: The session id of the client.
The return value is a dictionary. Modifications made to this
dictionary are not guaranteed to be preserved. If you want to modify
the user session, use the ``session`` context manager instead.
<20>r'<00>session)r r$r,s r<00> get_sessionzAsyncServer.get_sessionzs"<00><00><><00><16>!<21>!<21>#<23>&<26><06><15>~<7E>~<7E><1D>s<00> c<00><00><K<00>|j|<01>}||_y<01>w)z<>Store the user session for a client.
:param sid: The session id of the client.
:param session: The session dictionary.
Nr.)r r$r/r,s r<00> save_sessionzAsyncServer.save_session<6F>s<00><00><><00> <16>!<21>!<21>#<23>&<26><06> <20><06><0E>s<00>c<00>.<00><01>G<00>fd<01>d<02>}||<00><01>S)aTReturn the user session for a client with context manager syntax.
:param sid: The session id of the client.
This is a context manager that returns the user session dictionary for
the client. Any changes that are made to this dictionary inside the
context manager block are saved back to the session. Example usage::
@eio.on('connect')
def on_connect(sid, environ):
username = authenticate_user(environ)
if not username:
return False
with eio.session(sid) as session:
session['username'] = username
@eio.on('message')
def on_message(sid, msg):
async with eio.session(sid) as session:
print('received message from ', session['username'])
c<00>(<00><01>eZdZd<01>Z<03>fd<02>Z<04>fd<03>Zy)<05>5AsyncServer.session.<locals>._session_context_managerc<00>.<00>||_||_d|_y<00>N)<03>serverr$r/)r r8r$s r<00>__init__z>AsyncServer.session.<locals>._session_context_manager.__init__<5F>s<00><00>$<24><04> <0B><1E><04><08>#<23><04> rc<00><00>x<00>K<00>|jj<00><01><00>d{<00><02><03>|_|jS7<00><15>wr7)r8r0r/)r r$s <20>r<00>
__aenter__z@AsyncServer.session.<locals>._session_context_manager.__aenter__<5F>s0<00><><00><><00>%)<29>[<5B>[<5B>%<<3C>%<<3C>S<EFBFBD>%A<>A<><04> <0C><1B>|<7C>|<7C>#<23> B<01>s <00>:<01>8<04>:c<00><00>n<00>K<00>|jj<00>|j<00><00>d{<00><02><03>y7<00><05>wr7)r8r2r/)r <00>argsr$s <20>r<00> __aexit__z?AsyncServer.session.<locals>._session_context_manager.__aexit__<5F>s%<00><><00><><00><1A>k<EFBFBD>k<EFBFBD>.<2E>.<2E>s<EFBFBD>D<EFBFBD>L<EFBFBD>L<EFBFBD>A<>A<>A<>s <00>*5<01>3<04>5N)<06>__name__<5F>
__module__<EFBFBD> __qualname__r9r;r>)r$s<00>r<00>_session_context_managerr5<00>s<00><><00> $<24>
 $<24> BrrBr )r r$rBs ` rr/zAsyncServer.session<6F>s<00><><00>, B<01> B<01>(<28><04>c<EFBFBD>2<>2rNc
<00><00><>K<00>|<01>] |j|<01>}|j|jj<00><02><00>d{<00><02><03>||jvr|j|=yyt j|jj<00>D<00>cgc];}t j|j|jj<00><02><00><00><02>=c}<03><00>d{<00><02><03>i|_y7<00><>#t
$rYywxYwcc}w7<00>"<22>w)z<>Disconnect a client.
:param sid: The session id of the client to close. If this parameter
is not given, then all clients are closed.
Note: this method is a coroutine.
N)<01>reason)
r'<00>closerD<00>SERVER_DISCONNECT<43>socketsr(<00>asyncio<69>wait<69>values<65> create_task)r r$r,<00>clients r<00>
disconnectzAsyncServer.disconnect<63>s<><00><00><><00> <0F>?<3F> *<2A><1D>)<29>)<29>#<23>.<2E><06>
<1D>l<EFBFBD>l<EFBFBD>$<24>+<2B>+<2B>*G<>*G<>l<EFBFBD>H<>H<>H<><16>$<24>,<2C>,<2C>&<26><1C> <0C> <0C>S<EFBFBD>)<29>'<27><1A>,<2C>,<2C>#<23>l<EFBFBD>l<EFBFBD>1<>1<>3<> <0E>4<>F<EFBFBD><18>#<23>#<23>F<EFBFBD>L<EFBFBD>L<EFBFBD><1F>;<3B>;<3B>8<>8<>%1<>%:<3A>;<3B>3<> <0E><0F> <0F> <0F>
<1E>D<EFBFBD>L<EFBFBD>I<01><> <1C> <15><14> <15><> <0E> <0F>sM<00>C<<01>C&<00>)C<<01>C$<04>A C<<01> AC5<08>
C<<01>C:<04> C<<01>& C2<03>/C<<01>1C2<03>2 C<c<00><00><> K<00>|jd}tj|<03>r||i|<02><01><01>d{<00><02><03>}n||i|<02><01>}|jgk7rk|j d<03>}|rX|j |<04>}|<06>E||vrA|j |dzd<05>|j|j|dz<00>|<04><00>d{<00><02><03>S|d}tjj|j dd<08><00>}d |vr|d d
nd} d }
d} |j d d g<01>d
} | |jvr;|j dd<0F>|j|jd<0E>|<04><00>d{<00><02><03>Sd |vr|d d
nd} | <09>P|j d<10>dgk7r;|j dd<13>|j|jd<12>|<04><00>d{<00><02><03>Sd|vrd}
t|dd
<00>} |
r'| <0B>%|j dd<17>|jd<16>} <0A>nB|dk(<00>r}d|vr|j d<19>j#<00>nd}| <09>U| d k(s| |cxk(rdk(r nn|j%|| | <0B><00>d{<00><02><03>} <0A>n<>|j dd<1C>|jd<1B>} <0A>n<>| |j&vr+|j d| <09><00>d<1E>|jd| <09><00><02>} <0A>n<> |j)| <09>}|j+| <09>| k7r-| |k7r(|j d| <09><00>d<0F>|jd<0E>} <0A>n4 |j-|<04><00>d{<00><03><03>}t/|t0<00>r|j3|| <0B> <20>} n|} | |j&vr<>|j&| j:r<>|j&| =n<>|d"k(rx| <09>| |j&vr*|j d| <09><00>d<1E>|jd| <09><00><02>} n<>|j)| <09>} |j=|<04><00>d{<00><03><03>|j3| <0B> <20>} nB|d$k(r|j3<00>} n,|j>jCd%|<07>|jE<00>} t/| tF<00>s| S|jHr<>tK| d&<00>|jLk\r<>|j d'd<08>jOd(<28>D<00>cgc]$}|jOd)<29>d
jQ<00><00><02>&}}|D]=}||jRvs<01>tU|d*|z<00>| d&<00>| d&<| d+xxd,|fgz cc<n|j| |<04><00>d{<00><02><03>S7<00><04><>7<00><04>s7<00><03><>7<00><03>t#ttt f$rY<00><03>qwxYw7<00><02><>7<00><02>,#t4j6$r<| |j&vr|j9| <09><00>d{<00><03><03>7|j<00>} Y<00><02>RwxYw#t$r8}|j |<11>d!| <09><00>d<1E>|j|<11>d!| <09><00><03>} Yd}~<11><01><>d}~wwxYw7<00><02>#t4j6$r<| |j&vr|j9| <09><00>d{<00><03><03>7|j<00>} Y<00><01><>|j>jAd#<23>|j3| <0B> <20>} Y<00><02>(xYwcc}w7<00><01>R<EFBFBD>w)-z<>Handle an HTTP request from the client.
This is the entry point of the Engine.IO application. This function
returns the HTTP response to deliver to the client.
Note: this method is a coroutine.
<20>translate_requestN<74> HTTP_ORIGINz is not an accepted origin.z
bad-origin<69>REQUEST_METHOD<4F> QUERY_STRING<4E>r$rF<> transport<72>pollingzInvalid transportz bad-transport<72>EIO<49>4zRThe client is using an unsupported version of the Socket.IO or Engine.IO protocolsz bad-version<6F>jTzInvalid JSONP index numberzbad-jsonp-index<65>GET<45> HTTP_UPGRADE<44> websocketzInvalid websocket upgradez bad-upgradezInvalid session zbad-sidzInvalid transport for session )<01> jsonp_index<65> <20>POSTzpost request handler error<6F>OPTIONSzMethod %s not supported<65>response<73>HTTP_ACCEPT_ENCODING<4E>,<2C>;<3B>_<>headerszContent-Encoding)+rrH<00>iscoroutinefunction<6F>cors_allowed_origins<6E>get<65>_cors_allowed_origins<6E>_log_error_once<63>_make_response<73> _bad_request<73>urllib<69>parse<73>parse_qs<71>
transports<EFBFBD>int<6E>
ValueErrorr(<00>
IndexError<EFBFBD>lower<65>_handle_connectrGr'rT<00>handle_get_request<73>
isinstance<EFBFBD>list<73>_okr<00> EngineIOErrorrM<00>closed<65>handle_post_requestr)<00> exceptionr*<00>_method_not_found<6E>dict<63>http_compression<6F>len<65>compression_threshold<6C>splitr<00>compression_methods<64>getattr)r r=<00>kwargsrO<00>environ<6F>origin<69>allowed_origins<6E>method<6F>queryr$<00>jsonpr\rT<00>r<>upgrade_headerr,<00>packets<74>e<> encodings<67>encodings r<00>handle_requestzAsyncServer.handle_request<73>s<><00><00><><00>!<21>K<EFBFBD>K<EFBFBD>(;<3B><<3C><19> <12> &<26> &<26>'8<> 9<>-<2D>t<EFBFBD>><3E>v<EFBFBD>><3E>><3E>G<EFBFBD>'<27><14>8<><16>8<>G<EFBFBD> <0F> $<24> $<24><02> *<2A><1D>[<5B>[<5B><1D>/<2F>F<EFBFBD><15>"&<26>"<<3C>"<<3C>W<EFBFBD>"E<><0F>"<22>.<2E>6<EFBFBD>'<27>4(<28><18>(<28>(<28><1E>!><3E>><3E> <0C>N<01>!%<25>!4<>!4<><1C>)<29>)<29>"<22>%B<>B<>D<01><1F>"!<21>!<21>!<21>
<19>)<29>*<2A><06><16> <0C> <0C>%<25>%<25>g<EFBFBD>k<EFBFBD>k<EFBFBD>.<2E>"<22>&E<>F<><05>!&<26>%<25><1E>e<EFBFBD>E<EFBFBD>l<EFBFBD>1<EFBFBD>o<EFBFBD>T<EFBFBD><03><15><05><1A> <0B><1A>I<EFBFBD>I<EFBFBD>k<EFBFBD>I<EFBFBD>;<3B>7<><01>:<3A> <09> <14>D<EFBFBD>O<EFBFBD>O<EFBFBD> +<2B> <10> <20> <20>!4<>o<EFBFBD> F<><1D>,<2C>,<2C><14>!<21>!<21>"5<>6<><07>A<01>A<01> A<01>"'<27>%<25><1E>e<EFBFBD>E<EFBFBD>l<EFBFBD>1<EFBFBD>o<EFBFBD>T<EFBFBD><03> <0E>;<3B>5<EFBFBD>9<EFBFBD>9<EFBFBD>U<EFBFBD>+<2B><03>u<EFBFBD>4<> <10> <20> <20>)<29>*7<> <0E><1E>,<2C>,<2C>T<EFBFBD>-><3E>-><3E>)<29>.<0E><17><18><18> <18>
<0F>%<25><<3C><18>E<EFBFBD> <15>!<21>%<25><03>*<2A>Q<EFBFBD>-<2D>0<> <0B>
<11>[<5B>(<28> <10> <20> <20>!=<3D>!2<> 4<><14>!<21>!<21>"><3E>?<3F>A<EFBFBD> <13>u<EFBFBD>_<EFBFBD>!<21>W<EFBFBD>,<2C>%<25>[<5B>[<5B><1E>8<>><3E>><3E>@<40>26<32> <1B><12>{<7B><1D> <09>)<29>$<24><0E>E<>+<2B>E<>"<22>2<>2<>7<EFBFBD>I<EFBFBD>3><3E>@<01>@<01>A<EFBFBD><19>(<28>(<28>)D<>)6<>8<><1C>)<29>)<29>*E<>F<>A<EFBFBD><16>d<EFBFBD>l<EFBFBD>l<EFBFBD>*<2A><18>(<28>(<28>+;<3B>C<EFBFBD>5<EFBFBD>)A<>9<EFBFBD>M<><1C>)<29>)<29>,<<3C>S<EFBFBD>E<EFBFBD>*B<>C<>A<EFBFBD>6<>!%<25>!1<>!1<>#<23>!6<><06>
 <20>><3E>><3E>#<23>.<2E>)<29>;<3B> )<29>^<5E> ;<3B> <20>0<>0<>"@<40><13><05> F<> /<2F>1<>!%<25> 1<> 1<>2E<32> F<>A<EFBFBD> 8<>06<30>0I<30>0I<30>$+<2B>1-<2D>+-<2D><07>#-<2D>g<EFBFBD>t<EFBFBD>#<<3C>(,<2C><08><08><17>=H<>)1<>)J<01>A<EFBFBD>)0<>A<EFBFBD>
#<23>d<EFBFBD>l<EFBFBD>l<EFBFBD>2<>$(<28>L<EFBFBD>L<EFBFBD><13>$5<>$<<3C>$<<3C>$(<28>L<EFBFBD>L<EFBFBD><13>$5<> <13>v<EFBFBD> <1D><12>{<7B>c<EFBFBD><14><1C><1C>5<><14>$<24>$<24>'7<><03>u<EFBFBD>%=<3D>y<EFBFBD>I<><18>%<25>%<25>(8<><13><05>&><3E>?<3F><01><1D>)<29>)<29>#<23>.<2E><06> :<3A> <20>4<>4<>W<EFBFBD>=<3D>=<3D>=<3D><1C><08><08>[<5B><08>9<>A<EFBFBD><14>y<EFBFBD> <20><14><08><08>
<EFBFBD>A<EFBFBD> <10>K<EFBFBD>K<EFBFBD> <1F> <1F> 9<>6<EFBFBD> B<><14>&<26>&<26>(<28>A<EFBFBD><19>!<21>T<EFBFBD>"<22><14>H<EFBFBD> <0F> <20> <20><13>A<EFBFBD>j<EFBFBD>M<EFBFBD>"<22>d<EFBFBD>&@<40>&@<40>@<40> <20><1B><1B>%;<3B>R<EFBFBD>@<40>F<>F<>s<EFBFBD>K<>M<01>K<>67<36><11><17><17><13><1C>a<EFBFBD><1F>.<2E>.<2E>0<>K<> <16>M<01>%<25><08><1B>t<EFBFBD>7<>7<>7<>5<><07><04>c<EFBFBD>H<EFBFBD>n<EFBFBD>5<>a<EFBFBD>
<EFBFBD>m<EFBFBD>D<><16>j<EFBFBD>M<EFBFBD><15>i<EFBFBD>L<EFBFBD>&8<>(<28>%C<>$D<>D<>L<EFBFBD><19> &<26> <1A>(<28>(<28><11>G<EFBFBD>4<>4<>4<>Y?<3F><>!<21><> A<01><><18><><1F><08>*<2A>5<> <15><14> <15><> @<01><>2+-<2D><>$.<2E>#;<3B>#;<3B>8<>#&<26>$<24>,<2C>,<2C>#6<>*.<2E>/<2F>/<2F>#<23>*><3E>$><3E>$><3E>$(<28>$5<>$5<>$7<><01>8<><38>'$<24><<3C><1C>,<2C>,<2C><01>s<EFBFBD>!<21>C<EFBFBD>5<EFBFBD>\<5C>9<EFBFBD>E<> <20>-<2D>-<2D><11><03>1<EFBFBD>S<EFBFBD>E<EFBFBD>l<EFBFBD>;<3B><01><><<3C><>B><3E><>!<21>/<2F>/<2F>,<2C><1A>d<EFBFBD>l<EFBFBD>l<EFBFBD>*<2A>"<22>o<EFBFBD>o<EFBFBD>c<EFBFBD>2<>2<>2<><1C>)<29>)<29>+<2B>A<EFBFBD>:<3A><19>K<EFBFBD>K<EFBFBD>)<29>)<29>*F<>G<><1C><08><08>[<5B><08>9<>A<EFBFBD><41>M<01>5<>sJ<00>0Y5<01>T%<04>BY5<01>5T(<04>6B$Y5<01>T+<04>AY5<01>:T.<04>;
Y5<01>T1<00>A?Y5<01>U <04>A$Y5<01><V$<00> AY5<01>U<00>#U<04>$*U<00>BY5<01>W+<00>(W(<04>)W+<00>?BY5<01>)Y-<04>Y5<01>AY5<01> Y2<04>!Y5<01>(Y5<01>+Y5<01>.Y5<01>1U <03>Y5<01>U <03> Y5<01>U<00>5V!<03>V
<06>V!<03>Y5<01> V!<03>!Y5<01>$ W%<03>--W <03>Y5<01> W%<03>%Y5<01>(W+<00>+5Y*<03> X#<06>!Y*<03>6Y5<01>9.Y*<03>' Y5c<00><00><>K<00>|jjd<01>|jr6|jj<00>|j<00>d{<00><02><03>d|_yy7<00> <0A>w)z<>Stop Socket.IO background tasks.
This method stops background activity initiated by the Socket.IO
server. It must be called before shutting down the web server.
zSocket.IO is shutting downN)r)<00>info<66>service_task_event<6E>set<65>service_task_handler s r<00>shutdownzAsyncServer.shutdownfsU<00><00><><00> <0A> <0B> <0B><18><18>5<>6<> <0F> "<22> "<22> <10> #<23> #<23> '<27> '<27> )<29><16>*<2A>*<2A> *<2A> *<2A>'+<2B>D<EFBFBD> $<24> #<23> *<2A>s<00>AA#<01>A!<04>A#c<00>8<00>tj||i|<03><01><01>S)a<>Start a background task using the appropriate async model.
This is a utility function that applications can use to start a
background task using the method that is compatible with the
selected async mode.
:param target: the target function to execute.
:param args: arguments to pass to the function.
:param kwargs: keyword arguments to pass to the function.
The return value is a ``asyncio.Task`` object.
)rH<00> ensure_future)r <00>targetr=r<>s r<00>start_background_taskz!AsyncServer.start_background_taskrs<00><00><17>$<24>$<24>V<EFBFBD>T<EFBFBD>%<<3C>V<EFBFBD>%<<3C>=<3D>=rc<00><00>HK<00>tj|<01><00>d{<00><02><03>S7<00><04>w)a<Sleep for the requested amount of time using the appropriate async
model.
This is a utility function that applications can use to put a task to
sleep without having to worry about using the correct call for the
selected async mode.
Note: this method is a coroutine.
N)rH<00>sleep)r <00>secondss rr<>zAsyncServer.sleep<65>s<00><00><><00><1D>]<5D>]<5D>7<EFBFBD>+<2B>+<2B>+<2B>+<2B>s <00>"<01> <04>"c<00>,<00>tj|i|<02><01>S)aICreate a queue object using the appropriate async model.
This is a utility function that applications can use to create a queue
without having to worry about using the correct call for the selected
async mode. For asyncio based async modes, this returns an instance of
``asyncio.Queue``.
)rH<00>Queue<75>r r=r<>s r<00> create_queuezAsyncServer.create_queue<75><00><00><00><17>}<7D>}<7D>d<EFBFBD>-<2D>f<EFBFBD>-<2D>-rc<00>"<00>tjS)aZReturn the queue empty exception for the appropriate async model.
This is a utility function that applications can use to work with a
queue without having to worry about using the correct call for the
selected async mode. For asyncio based async modes, this returns an
instance of ``asyncio.QueueEmpty``.
)rH<00>
QueueEmptyr s r<00>get_queue_empty_exceptionz%AsyncServer.get_queue_empty_exception<6F>s<00><00><17>!<21>!<21>!rc<00>,<00>tj|i|<02><01>S)aKCreate an event object using the appropriate async model.
This is a utility function that applications can use to create an
event without having to worry about using the correct call for the
selected async mode. For asyncio based async modes, this returns
an instance of ``asyncio.Event``.
)rH<00>Eventr<74>s r<00> create_eventzAsyncServer.create_event<6E>r<>rc<00><00><>K<00>|j|<02>}|jd}tj|<04>r!||d|d|z|d|<02><00>d{<00><02><03>}|S||d|d|z|d|<02>}|S7<00><1F>w)N<> make_response<73>statusrer`)<04> _cors_headersrrHrf)r <00> response_dictr<74><00> cors_headersr<73>r`s rrkzAsyncServer._make_response<73>s<><00><00><><00><1B>)<29>)<29>'<27>2<> <0C><1C> <0B> <0B>O<EFBFBD>4<> <0A> <12> &<26> &<26>}<7D> 5<>*<2A><1D>h<EFBFBD>'<27><1D>i<EFBFBD>(<28><<3C>7<><1D>j<EFBFBD>)<29>7<EFBFBD>4<>4<>H<EFBFBD><18><0F> %<25><1D>h<EFBFBD>'<27><1D>i<EFBFBD>(<28><<3C>7<><1D>j<EFBFBD>)<29>7<EFBFBD>4<>H<EFBFBD><18><0F>4<>s<00>AA4<01>A2<04> A4c
<00><00>K<00>|jr'd|_|j|j<00>|_|j <00>}t j ||<04>}||j|<tjtj||j||<02>t|jdz<00>t|j|jz<00>dz|j d<03><05>}|j#|<06><00>d{<00><02><03>|j%<00>|j'd||d<01><06><00>d{<00><02><03>}|<07>A|dur=|j|=|j(j+d<08>|j-|xsd<04>S|d k(rB|j/|<01><00>d{<00><02><03>}|j0r||jvr |j|=|Sd|_d}|j4r]t7|j4t8<00>r d
|j;||j4<00>fg}n#d
|j;||j4d d d <0A><03>fg} |j=|j?<00><00>d{<00><03><03>||<03><0E>S7<00><01>Y7<00><01>/7<00><>7<00>#t@jB$r|jE<00>cYSwxYw<01>w)z#Handle a client connection request.Fi<46>)r$<00>upgrades<65> pingTimeout<75> pingInterval<61>
maxPayloadN<EFBFBD>connect)<01> run_asyncTzApplication rejected connectionr[z
Set-Cookier<00>Lax)<03>name<6D>path<74>SameSite)rer\)#<23>start_service_taskr<6B><00> _service_taskr<6B><00> generate_idr<00> AsyncSocketrGrr"<00>OPEN<45> _upgradesrq<00> ping_timeout<75> ping_interval<61>ping_interval_grace_period<6F>max_http_buffer_sizer%<00> schedule_ping<6E>_trigger_eventr)r*<00> _unauthorizedrvr{<00> connected<65>cookierwr<00>_generate_sid_cookiery<00>pollrr<>rl) r r<>rTr\r$<00>sr+<00>retres rruzAsyncServer._handle_connect<63>sf<00><00><><00> <0F> "<22> "<22>&+<2B>D<EFBFBD> #<23>'+<2B>'A<>'A<><14>"<22>"<22>($<24>D<EFBFBD> $<24><13><1E><1E> <20><03> <18> $<24> $<24>T<EFBFBD>3<EFBFBD> /<2F><01><1D><04> <0C> <0C>S<EFBFBD><19><14>m<EFBFBD>m<EFBFBD>F<EFBFBD>K<EFBFBD>K<EFBFBD><16><1C><0E><0E>s<EFBFBD>I<EFBFBD>6<><1E>t<EFBFBD>0<>0<>4<EFBFBD>7<>8<><1F><14>"<22>"<22>T<EFBFBD>%D<>%D<>D<>F<01>HL<48>M<01><1E>3<>3<> *
<EFBFBD> <0B><03><10>f<EFBFBD>f<EFBFBD>S<EFBFBD>k<EFBFBD><19><19> <09><0F><0F><19><18>'<27>'<27> <09>3<EFBFBD><07>27<32>(<28>9<>9<><03> <0E>?<3F>s<EFBFBD>$<24><EFBFBD><14> <0C> <0C>S<EFBFBD>!<21> <10>K<EFBFBD>K<EFBFBD> <1F> <1F> A<> B<><17>%<25>%<25>c<EFBFBD>k<EFBFBD>T<EFBFBD>2<> 2<> <14> <0B> #<23><19>,<2C>,<2C>W<EFBFBD>5<>5<>C<EFBFBD><10>x<EFBFBD>x<EFBFBD>C<EFBFBD>4<EFBFBD><<3C><<3C>/<2F><18>L<EFBFBD>L<EFBFBD><13>%<25><16>J<EFBFBD><1E>A<EFBFBD>K<EFBFBD><1A>G<EFBFBD><13>{<7B>{<7B><1D>d<EFBFBD>k<EFBFBD>k<EFBFBD>4<EFBFBD>0<>$<24><1C>1<>1<>#<23>t<EFBFBD>{<7B>{<7B>C<> <16><17>G<EFBFBD> %<25><1C>1<>1<>#<23>$(<28>K<EFBFBD>K<EFBFBD><13>%<25>8<1A><1B> <16><17>G<EFBFBD>  +<2B><1B>x<EFBFBD>x<EFBFBD>a<EFBFBD>f<EFBFBD>f<EFBFBD>h<EFBFBD><0E><07>,7<> <20>9<>9<>C <1A><>9<><39>6<><36>,!/<2F><><1D>(<28>(<28> +<2B><1B>(<28>(<28>*<2A>*<2A> +<2B>sn<00>C:J<01><I<04>=,J<01>)I<04>*A J<01>
I<04> BJ<01>+I<00> I<08>
I<00>J<01>J<01>J<01>I<00>#J<03>J<01>J<03>Jc<00><00>$<00><00><01>K<00>|jdd<02>}d}<05><01>jvr<>tj<00>j<00><00>ra<72><02><01>fd<04>}|rG<72>j |<06>}t
j |<05>|jt
j<00>|S|<06><00>d{<00><02><03>}|S<00><02><01>fd<05>}|rG<72>j |<07>}t
j |<05>|jt
j<00>|S|<07><00>d{<00><02><03>}|S7<00>g7<00><08>w)zInvoke an event handler.r<>FNc<00><00>P<00>K<00> <00>j<00><00><00><00>d{<00><04><03>S7<00>#t$r8<00>dk(r1t<00><00>dk(r#<00>j<00><00>d<00><00>d{<00><04><03>7cYS<00>wxYw#tj$rYy<00>j
j <00>dz<00><00>dk(rYyYyxYw<01>w)NrM<00>rz async handler errorr<72>F)<07>handlers<72> TypeErrorr<72>rH<00>CancelledErrorr)r}<00>r=<00>eventr s<00><><EFBFBD>r<00>run_async_handlerz5AsyncServer._trigger_event.<locals>.run_async_handler<65>s<><00><><00><><00>)<29> &<26>)=<3D><14><1D><1D>u<EFBFBD>)=<3D>t<EFBFBD>)D<>#D<>D<>#D<><44>(<28>&<26>$<24> <0C>4<>$'<27><04>I<EFBFBD><11>N<EFBFBD>.B<01>T<EFBFBD>]<5D>]<5D>5<EFBFBD>-A<>$<24>q<EFBFBD>'<27>-J<>'J<>'J<> J<> %<25>&<26><>#<23>1<>1<><1D><1C>)<29><1C> <0B> <0B>-<2D>-<2D>e<EFBFBD>6L<36>.L<>M<> <20>I<EFBFBD>-<2D>$)<29>.<2E>s[<00>B&<01>"<00> <04>"<00>B&<01>"<00>7A#<03>A<06>A#<03>A&<00> B&<01>!A#<03>#A&<00>&B#<03>9B&<01>;$B#<03>B&c<00><00><00>K<00> <00>j<00><00><00>S#t$r/<00>dk(r(t<00><00>dk(r<00>j<00><00>d<00>cYS<00>wxYw#<00>jj <00>dz<00><00>dk(rYyYyxYw<01>w)NrMr<>rz handler errorr<72>F)r<>r<>r<>r)r}r<>s<00><><EFBFBD>r<00>run_sync_handlerz4AsyncServer._trigger_event.<locals>.run_sync_handlers<><00><><00><><00>)<29> &<26>#7<>4<EFBFBD>=<3D>=<3D><15>#7<><14>#><3E>><3E><>(<28>&<26>$<24> <0C>4<>$'<27><04>I<EFBFBD><11>N<EFBFBD>(<<3C>t<EFBFBD>}<7D>}<7D>U<EFBFBD>';<3B>D<EFBFBD><11>G<EFBFBD>'D<> D<> %<25>&<26><>)<29><1C> <0B> <0B>-<2D>-<2D>e<EFBFBD>6F<36>.F<>G<> <20>I<EFBFBD>-<2D>$)<29>.<2E>s7<00>A?<01><00>A?<01>4A<03> A<00> A?<01>A<03>A<00>%A<<03>8A?) <09>popr<70>rHrfr<><00>task_reference_holder<65>add<64>add_done_callback<63>discard)r r<>r=r<>r<>r<>r<>r<>s``` rr<>zAsyncServer._trigger_event<6E>s<><00><><00><><00><1A>J<EFBFBD>J<EFBFBD>{<7B>E<EFBFBD>2<> <09><12><03> <10>D<EFBFBD>M<EFBFBD>M<EFBFBD> !<21><16>*<2A>*<2A>4<EFBFBD>=<3D>=<3D><15>+?<3F>@<40>)<29>*<1D><1E>4<>4<>5F<35>G<>C<EFBFBD>)<29>-<2D>-<2D>c<EFBFBD>2<><17>)<29>)<29>*?<3F>*G<>*G<>H<>:<13>
<EFBFBD>7!2<> 3<>3<>C<EFBFBD>6<13>
<EFBFBD>3)<29>&<1D><1E>4<>4<>5E<35>F<>C<EFBFBD>)<29>-<2D>-<2D>c<EFBFBD>2<><17>)<29>)<29>*?<3F>*G<>*G<>H<><13>
<EFBFBD>!1<> 2<>2<>C<EFBFBD><12>
<EFBFBD>74<><34>43<>s%<00>BD<01>$D <04>%A D<01>D<04>D<01>Dc<00><00><>K<00>tj<00>}|j<00>|_|jj <00><00>sSt |j <00>dk(rC tj|jj<00>|j<00><02><00>d{<00><03><03>y|jt |j <00>z } |j j<00>j<00>D]<5D>}|jr |j |j=n$|j s|j#<00><00>d{<00><03><03> tj|jj<00>|<02><02><00>d{<00><04><03>t%<00><00> |jj <00>s<02><01>Ryy7<00><>#tj$rY<00><01><>wxYw#t$rY<00><>wxYw7<00><>7<00>[#tj$rY<00><>wxYw#t&t$tj(t*f$r|j,j/d<04>Yy|j1<00>r|j,j/d<05>Yy|j,j3d<06>Y<00><>xYw<01>w)z;Monitor connected clients and clean up those that time out.r)<01>timeoutNzservice task canceledz*event loop is closed, exiting service taskzservice task exception)rH<00>get_running_loopr<70>r<><00>is_setr<74>rG<00>wait_forrIr<><00> TimeoutError<6F>copyrJr{r$r(<00>closing<6E>check_ping_timeout<75>KeyboardInterrupt<70>
SystemExitr<EFBFBD><00> GeneratorExitr)r<><00> is_closedr})r <00>loop<6F>sleep_intervalr<6C>s rr<>zAsyncServer._service_task1s!<00><00><><00><16>'<27>'<27>)<29><04>"&<26>"3<>"3<>"5<><04><1F><16>)<29>)<29>0<>0<>2<><12>4<EFBFBD><<3C><<3C> <20>A<EFBFBD>%<25><1D>!<21>*<2A>*<2A>4<EFBFBD>+B<>+B<>+G<>+G<>+I<>37<33>3D<33>3D<33>F<01>F<01>F<01><19>
"<22>.<2E>.<2E><13>T<EFBFBD>\<5C>\<5C>1B<31>B<>N<EFBFBD>! @<01><1D><1C><1C>*<2A>*<2A>,<2C>3<>3<>5<>A<EFBFBD><18>x<EFBFBD>x<EFBFBD>!<21> $<24> <0C> <0C>Q<EFBFBD>U<EFBFBD>U<EFBFBD> 3<>
<1F>Y<EFBFBD>Y<EFBFBD><1F>2<>2<>4<>4<>4<>!<21>%<25>.<2E>.<2E>t<EFBFBD>/F<>/F<>/K<>/K<>/M<>7E<37>G<01>G<01>G<01>/<2F>1<>1<>6<><17>)<29>)<29>0<>0<>2<>2<>F<01><><1F>+<2B>+<2B><1D><1C><1D><> (<28>!<21>!<21>!<21><>
5<><35>G<01><>#<23>/<2F>/<2F>!<21> <20>!<21><><1B>!<21><17>&<26>&<26><1D> <0E> <16> <15> <0B> <0B> <20> <20>!8<>9<><15> @<01><17>><3E>><3E>#<23><18>K<EFBFBD>K<EFBFBD>$<24>$<24>&,<2C>-<2D><19><15> <0B> <0B>%<25>%<25>&><3E>?<3F>s<EFBFBD><00>AI1<01> <F<00>F<04>F<00>!#I1<01>7G#<00>=F7<02> G#<00>4G<06>5G#<00>:2G
<02>,G<06>-G
<02>;G#<00><I1<01>I1<01>F<00>F4<03>0I1<01>3F4<03>4I1<01>7 G<05>G#<00>G<05>G#<00>G
<02>
G <05>G#<00>G <05> G#<00>#>I.<03>!I1<01>#,I.<03>I1<01>I.<03>,I1)z engine.ior7)r)r?r@rA<00>__doc__rrrr%r!r0r2r/rMr<>r<>r<>r<>r<>r<>r<>rkrur<>r<>r rrr r su<00><00>B<08>F<14>7<>E<01>
N<01><1F>
<1E>!<21>#3<>J<1E>4V5<>p
,<2C> ><3E>
,<2C>.<2E>"<22>.<2E> <18>8+<2B>t;<13>z2@rr ) rHrmrSrrrrr<>r<><00>
BaseServerr r rr<00><module>r<>s7<00><01><0E> <0A><19><18><14><1A>
<1C><05><15>T @<01>+<2B>(<28>(<28>T @r