3
ñ\ð]µ  ã               @   s   d dl Z G dd„ de jƒZdS )é    Nc                   s"   e Zd ZdZd‡ fdd„	Z‡  ZS )ÚASGIAppaB  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.

    Example usage::

        import socketio
        import uvicorn

        sio = socketio.AsyncServer()
        app = engineio.ASGIApp(sio, static_files={
            '/': 'index.html',
            '/static': './public',
        })
        uvicorn.run(app, host='127.0.0.1', port=5000)
    Nú	socket.ioc                s   t ƒ j||||d� d S )N)Ústatic_filesZengineio_path)ÚsuperÚ__init__)ÚselfZsocketio_serverZother_asgi_appr   Zsocketio_path)Ú	__class__© ú8/tmp/pip-build-mqc4i71p/python-socketio/socketio/asgi.pyr       s    
zASGIApp.__init__)NNr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú__classcell__r	   r	   )r   r
   r      s    r   )Zengineior   r	   r	   r	   r
   Ú<module>   s   