Skip to content

Commit b33cab0

Browse files
daavvedaaavvve
andauthored
change room documentation from room= to to= (#1519)
Co-authored-by: Dave McInnis <dave.mcinnis@verint.com>
1 parent a222638 commit b33cab0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,28 +315,28 @@ rooms through the ``join_room()`` and ``leave_room()`` functions::
315315
username = data['username']
316316
room = data['room']
317317
join_room(room)
318-
send(username + ' has entered the room.', room=room)
318+
send(username + ' has entered the room.', to=room)
319319

320320
@socketio.on('leave')
321321
def on_leave(data):
322322
username = data['username']
323323
room = data['room']
324324
leave_room(room)
325-
send(username + ' has left the room.', room=room)
325+
send(username + ' has left the room.', to=room)
326326

327-
The ``send()`` and ``emit()`` functions accept an optional ``room`` argument
327+
The ``send()`` and ``emit()`` functions accept an optional ``to`` argument
328328
that cause the message to be sent to all the clients that are in the given
329329
room.
330330

331331
All clients are assigned a room when they connect, named with the session ID
332332
of the connection, which can be obtained from ``request.sid``. A given client
333333
can join any rooms, which can be given any names. When a client disconnects it
334334
is removed from all the rooms it was in. The context-free ``socketio.send()``
335-
and ``socketio.emit()`` functions also accept a ``room`` argument to broadcast
335+
and ``socketio.emit()`` functions also accept a ``to`` argument to broadcast
336336
to all clients in a room.
337337

338338
Since all clients are assigned a personal room, to address a message to a
339-
single client, the session ID of the client can be used as the room argument.
339+
single client, the session ID of the client can be used as the ``to`` argument.
340340

341341
Connection Events
342342
-----------------

0 commit comments

Comments
 (0)