�
���g� � �4 � d dl Z G d� de j � � ZdS )� Nc �* � � e Zd ZdZ d� fd� Z� xZS )�ASGIAppa� ASGI application middleware for Socket.IO.
This middleware dispatches traffic to an Socket.IO application. It can
also serve a list of static files to the client, or forward unrelated
HTTP traffic to another ASGI application.
:param socketio_server: The Socket.IO server. Must be an instance of the
``socketio.AsyncServer`` class.
:param static_files: A dictionary with static file mapping rules. See the
documentation for details on this argument.
:param other_asgi_app: A separate ASGI app that receives all other traffic.
:param socketio_path: The endpoint where the Socket.IO application should
be installed. The default value is appropriate for
most cases. With a value of ``None``, all incoming
traffic is directed to the Socket.IO server, with the
assumption that routing, if necessary, is handled by
a different layer. When this option is set to
``None``, ``static_files`` and ``other_asgi_app`` are
ignored.
:param on_startup: function to be called on application startup; can be
coroutine
:param on_shutdown: function to be called on application shutdown; can be
coroutine
Example usage::
import socketio
import uvicorn
sio = socketio.AsyncServer()
app = socketio.ASGIApp(sio, static_files={
'/': 'index.html',
'/static': './public',
})
uvicorn.run(app, host='127.0.0.1', port=5000)
N� socket.ioc �V �� t � � � ||||||�� � d S )N)�static_files�
engineio_path�
on_startup�on_shutdown)�super�__init__)�self�socketio_server�other_asgi_appr �
socketio_pathr r
� __class__s ��]/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/socketio/asgi.pyr zASGIApp.__init__) s? �� � ������.�&2�'4��%0� � 2� 2� 2� 2� 2� )NNr NN)�__name__�
__module__�__qualname__�__doc__r �
__classcell__)r s @r r r sS �� � � � � �#� #�H 8<�2=�.2�2� 2� 2� 2� 2� 2� 2� 2� 2� 2r r )�engineior � r r �<module>r sE �� ����+2� +2� +2� +2� +2�h�� +2� +2� +2� +2� +2r