(self, event, data, namespace=None, room=None, skip_sid=None,
                   callback=None, **kwargs)
Emit a message to a single client, a room, or all the clients
        connected to the namespace.

        This method takes care or propagating the message to all the servers
        that are connected through the message queue.

        The parameters are the same as in :meth:`.Server.emit`.

        Note: this method is a coroutine.
Emit a message to a single client, a room, or all the clients
        connected to the namespace.
Emit a message to a single client a room or all the clients connected to the namespace .
async def emit(self, event, data, namespace=None, room=None, skip_sid=None,
                   callback=None, **kwargs):
        """Emit a message to a single client, a room, or all the clients
        connected to the namespace.

        This method takes care or propagating the message to all the servers
        that are connected through the message queue.

        The parameters are the same as in :meth:`.Server.emit`.

        Note: this method is a coroutine.
        """
        if kwargs.get('ignore_queue'):
            return await super().emit(
                event, data, namespace=namespace, room=room, skip_sid=skip_sid,
                callback=callback)
        namespace = namespace or '/'
        if callback is not None:
            if self.server is None:
                raise RuntimeError('Callbacks can only be issued from the '
                                   'context of a server.')
            if room is None:
                raise ValueError('Cannot use callback without a room set.')
            id = self._generate_ack_id(room, callback)
            callback = (room, namespace, id)
        else:
            callback = None
        await self._publish({'method': 'emit', 'event': event, 'data': data,
                             'namespace': namespace, 'room': room,
                             'skip_sid': skip_sid, 'callback': callback,
                             'host_id': self.host_id})
async def emit ( self , event , data , namespace = None , room = None , skip_sid = None , callback = None , * * kwargs ) : if kwargs . get ( 'ignore_queue' ) : return await super ( ) . emit ( event , data , namespace = namespace , room = room , skip_sid = skip_sid , callback = callback ) namespace = namespace or '/' if callback is not None : if self . server is None : raise RuntimeError ( 'Callbacks can only be issued from the ' 'context of a server.' ) if room is None : raise ValueError ( 'Cannot use callback without a room set.' ) id = self . _generate_ack_id ( room , callback ) callback = ( room , namespace , id ) else : callback = None await self . _publish ( { 'method' : 'emit' , 'event' : event , 'data' : data , 'namespace' : namespace , 'room' : room , 'skip_sid' : skip_sid , 'callback' : callback , 'host_id' : self . host_id } )