@@ -177,7 +177,7 @@ def register_namespace(self, namespace_handler):
177177 namespace_handler
178178
179179 def emit (self , event , data = None , room = None , skip_sid = None , namespace = None ,
180- callback = None ):
180+ callback = None , ** kwargs ):
181181 """Emit a custom event to one or more connected clients.
182182
183183 :param event: The event name. It can be any string. The event names
@@ -202,14 +202,22 @@ def emit(self, event, data=None, room=None, skip_sid=None, namespace=None,
202202 that will be passed to the function are those provided
203203 by the client. Callback functions can only be used
204204 when addressing an individual client.
205+ :param ignore_queue: Only used when a message queue is configured. If
206+ set to ``True``, the event is emitted to the
207+ clients directly, without going through the queue.
208+ This is more efficient, but only works when a
209+ single server process is used. It is recommended
210+ to always leave this parameter with its default
211+ value of ``False``.
205212 """
206213 namespace = namespace or '/'
207214 self .logger .info ('emitting event "%s" to %s [%s]' , event ,
208215 room or 'all' , namespace )
209- self .manager .emit (event , data , namespace , room , skip_sid , callback )
216+ self .manager .emit (event , data , namespace , room , skip_sid , callback ,
217+ ** kwargs )
210218
211219 def send (self , data , room = None , skip_sid = None , namespace = None ,
212- callback = None ):
220+ callback = None , ** kwargs ):
213221 """Send a message to one or more connected clients.
214222
215223 This function emits an event with the name ``'message'``. Use
@@ -234,8 +242,16 @@ def send(self, data, room=None, skip_sid=None, namespace=None,
234242 that will be passed to the function are those provided
235243 by the client. Callback functions can only be used
236244 when addressing an individual client.
245+ :param ignore_queue: Only used when a message queue is configured. If
246+ set to ``True``, the event is emitted to the
247+ clients directly, without going through the queue.
248+ This is more efficient, but only works when a
249+ single server process is used. It is recommended
250+ to always leave this parameter with its default
251+ value of ``False``.
237252 """
238- self .emit ('message' , data , room , skip_sid , namespace , callback )
253+ self .emit ('message' , data , room , skip_sid , namespace , callback ,
254+ ** kwargs )
239255
240256 def enter_room (self , sid , room , namespace = None ):
241257 """Enter a room.
0 commit comments