@@ -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
328328that cause the message to be sent to all the clients that are in the given
329329room.
330330
331331All clients are assigned a room when they connect, named with the session ID
332332of the connection, which can be obtained from ``request.sid ``. A given client
333333can join any rooms, which can be given any names. When a client disconnects it
334334is 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
336336to all clients in a room.
337337
338338Since 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
341341Connection Events
342342-----------------
0 commit comments