�
���g% � �^ � d dl mZ G d� dej � � Z G d� dej � � ZdS )� )�base_namespacec �t � e Zd ZdZd� Z dd�Z dd�Z dd�Zdd�Zdd �Z dd
�Z
dd�Zdd�Zdd
�Z
dd�ZdS )� Namespacea Base class for server-side class-based namespaces.
A class-based namespace is a class that contains all the event handlers
for a Socket.IO namespace. The event handlers are methods of the class
with the prefix ``on_``, such as ``on_connect``, ``on_disconnect``,
``on_message``, ``on_json``, and so on.
:param namespace: The Socket.IO namespace to be used with all the event
handlers defined in this class. If this argument is
omitted, the default namespace is used.
c �� � d|pdz }t | |� � rF t | |� � |� S # t $ r% |dk r t | |� � |dd� � cY S � w xY wdS �ab Dispatch an event to the proper handler method.
In the most common usage, this method is not overloaded by subclasses,
as it performs the routing of events to methods. However, this
method can be overridden if special dispatching rules are needed, or if
having a single method that catches all events is desired.
�on_� �
disconnectN�������hasattr�getattr� TypeError��self�event�args�handler_names �b/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/socketio/namespace.py�
trigger_eventzNamespace.trigger_event � � � ����,���4��&�&� �
�2�w�t�\�2�2�D�9�9���
�
�
��L�(�(�6�7�4��6�6��S�b�S� �B�B�B�B��
���� � � �, �+A�ANFc
�T � | j � ||||||p| j ||�� � S )z�Emit a custom event to one or more connected clients.
The only difference with the :func:`socketio.Server.emit` method is
that when the ``namespace`` argument is not given the namespace
associated with the class is used.
)�data�to�room�skip_sid� namespace�callback�ignore_queue)�server�emitr ) r r r r r r r r r s r r"