Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/miguelgrinberg/Flask-SocketIO
/ functions
Functions
171 in github.com/miguelgrinberg/Flask-SocketIO
⨍
Functions
171
◇
Types & classes
10
↳
Endpoints
6
↓ 70 callers
Method
get_received
Return the list of messages received from the server. Since this is not a real client, any time the server emits an event, the event
src/flask_socketio/test_client.py:228
↓ 59 callers
Method
test_client
The Socket.IO test client is useful for testing a Flask-SocketIO server. It works in a similar way to the Flask Test Client, but adapt
src/flask_socketio/__init__.py:785
↓ 42 callers
Method
emit
Emit a server generated SocketIO event. This function emits a SocketIO event to one or more connected clients. A JSON blob can be att
src/flask_socketio/__init__.py:425
↓ 35 callers
Function
emit
Emit a SocketIO event. This function emits a SocketIO event to one or more connected clients. A JSON blob can be attached to the event as pay
src/flask_socketio/__init__.py:877
↓ 17 callers
Function
send
Send a SocketIO message. This function sends a simple SocketIO message to one or more connected clients. The message can be a string or a JSO
src/flask_socketio/__init__.py:984
↓ 17 callers
Method
send
Send a server-generated SocketIO message. This function sends a simple SocketIO message to one or more connected clients. The message
src/flask_socketio/__init__.py:524
↓ 15 callers
Method
is_connected
Check if a namespace is connected. :param namespace: The namespace to check. The global namespace is assumed if this
src/flask_socketio/test_client.py:101
↓ 12 callers
Method
disconnect
Disconnect the client. :param namespace: The namespace to disconnect. The global namespace is assumed if this argume
src/flask_socketio/test_client.py:157
↓ 6 callers
Method
dumps
(*args, **kwargs)
src/flask_socketio/__init__.py:239
↓ 5 callers
Method
on
Decorator to register a SocketIO event handler. This decorator must be applied to SocketIO event handlers. Example:: @socketio.o
src/flask_socketio/__init__.py:272
↓ 4 callers
Method
_handle_event
(self, handler, message, namespace, sid, *args)
src/flask_socketio/__init__.py:810
↓ 4 callers
Method
init_app
(self, app, **kwargs)
src/flask_socketio/__init__.py:205
↓ 4 callers
Function
join_room
Join a room. This function puts the user in a room, under the current namespace. The user and the namespace are obtained from the event conte
src/flask_socketio/__init__.py:1043
↓ 4 callers
Function
leave_room
Leave a room. This function removes the user from a room, under the current namespace. The user and the namespace are obtained from the event
src/flask_socketio/__init__.py:1069
↓ 4 callers
Function
rooms
Return a list of the rooms the client is in. This function returns all the rooms the client has entered, including its own room, assigned by
src/flask_socketio/__init__.py:1109
↓ 3 callers
Function
disconnect
Disconnect the client. This function terminates the connection with the client. As a result of this call the client will receive a disconnect
src/flask_socketio/__init__.py:1126
↓ 3 callers
Method
run
Run the SocketIO web server. :param app: The Flask application instance. :param host: The hostname or IP address for the server to li
src/flask_socketio/__init__.py:577
↓ 3 callers
Method
sleep
Sleep for the requested amount of time using the appropriate async model. This is a utility function that applications can use to put
src/flask_socketio/__init__.py:775
↓ 3 callers
Method
start_background_task
Start a background task using the appropriate async model. This is a utility function that applications can use to start a background
src/flask_socketio/__init__.py:758
↓ 2 callers
Function
close_room
Close a room. This function removes any users that are in the given room and then deletes the room from the server. :param room: The nam
src/flask_socketio/__init__.py:1094
↓ 2 callers
Method
close_room
Close a room. This function removes any users that are in the given room and then deletes the room from the server. This function can
src/flask_socketio/__init__.py:564
↓ 2 callers
Method
on_event
Register a SocketIO event handler. ``on_event`` is the non-decorator version of ``'on'``. Example:: def on_foo_event(js
src/flask_socketio/__init__.py:356
↓ 2 callers
Method
on_namespace
(self, namespace_handler)
src/flask_socketio/__init__.py:416
↓ 1 callers
Method
__init__
(self, app=None, **kwargs)
src/flask_socketio/__init__.py:185
↓ 1 callers
Method
_set_socketio
(self, socketio)
src/flask_socketio/namespace.py:9
↓ 1 callers
Method
call
Emit a SocketIO event and wait for the response. This method issues an emit with a callback and waits for the callback to be invoked
src/flask_socketio/__init__.py:489
↓ 1 callers
Method
connect
Connect the client. :param namespace: The namespace for the client. If not provided, the client connects to the ser
src/flask_socketio/test_client.py:109
↓ 1 callers
Method
emit
Emit an event to the server. :param event: The event name. :param *args: The event arguments. :param callback: ``True`` if th
src/flask_socketio/test_client.py:169
Method
__call__
(self, environ, start_response)
src/flask_socketio/__init__.py:39
Method
__init__
(self, id=None)
example/sessions.py:16
Method
__init__
(self, socketio_app, flask_app, socketio_path='socket.io')
src/flask_socketio/__init__.py:34
Method
__init__
(self, app, socketio, namespace=None, query_string=None, headers=None, auth=None, flask_test_
src/flask_socketio/test_client.py:29
Method
__init__
(self, namespace=None)
src/flask_socketio/namespace.py:5
Method
_callback_wrapper
(*args)
src/flask_socketio/__init__.py:476
Method
_handler
(sid, *args)
src/flask_socketio/__init__.py:295
Method
_mock_send_eio_packet
(eio_sid, eio_pkt)
src/flask_socketio/test_client.py:64
Method
_mock_send_packet
(eio_sid, pkt)
src/flask_socketio/test_client.py:31
Function
background_task
()
test_socketio.py:50
Function
background_thread
Example of how to send server generated events to clients.
example/app_namespace.py:18
Function
background_thread
Example of how to send server generated events to clients.
example/app.py:19
Function
call
Emit a SocketIO event and wait for the response. This function issues an emit with a callback and waits for the callback to be invoked by the
src/flask_socketio/__init__.py:938
Function
can_disconnect
()
example/app.py:94
Function
catch_all
(event, data)
test_socketio.py:112
Function
catch_all
(event, data)
example/app.py:85
Method
close_room
Close a room.
src/flask_socketio/namespace.py:51
Function
connect
()
test_socketio.py:35
Function
connect
()
example/app.py:112
Method
decorator
(handler)
src/flask_socketio/__init__.py:293
Function
disconnect_request
()
example/app.py:92
Method
emit
Emit a custom event to one or more connected clients.
src/flask_socketio/namespace.py:36
Function
error_handler
(value)
test_socketio.py:196
Function
error_handler_default
(value)
test_socketio.py:226
Function
error_handler_namespace
(value)
test_socketio.py:211
Method
event
Decorator to register an event handler. This is a simplified version of the ``on()`` method that takes the event name from the decora
src/flask_socketio/__init__.py:381
Function
get_request_event
(data)
test_socketio.py:96
Function
get_request_event2
(data)
test_socketio.py:102
Function
get_session
()
example/sessions.py:50
Function
index
()
example/sessions.py:26
Function
index
()
example/app_namespace.py:30
Function
index
()
example/app.py:30
Function
join
(message)
example/app.py:50
Function
leave
(message)
example/app.py:59
Function
load_user
(id)
example/sessions.py:21
Method
loads
(*args, **kwargs)
src/flask_socketio/__init__.py:244
Function
message
(message)
test_socketio.py:57
Function
my_broadcast_event
(message)
example/app.py:42
Function
my_event
(message)
example/app.py:35
Function
my_ping
()
example/app.py:107
Function
my_room_event
(message)
example/app.py:77
Function
on_bad_callback
()
test_socketio.py:178
Function
on_bad_response
()
test_socketio.py:173
Function
on_bgtest_connect
()
test_socketio.py:49
Function
on_changing_response
()
test_socketio.py:183
Function
on_close_room
(message)
example/app.py:68
Method
on_close_room
(self, message)
example/app_namespace.py:60
Function
on_connect
(auth)
test_socketio.py:16
Method
on_connect
(self)
test_socketio.py:241
Method
on_connect
()
test_socketio.py:767
Method
on_connect
(self)
example/app_namespace.py:82
Function
on_custom_event
(data)
test_socketio.py:88
Function
on_custom_event_broadcast
(data)
test_socketio.py:130
Function
on_custom_event_broadcast_test
(data)
test_socketio.py:135
Function
on_custom_event_test
(data)
test_socketio.py:117
Function
on_custom_event_test2
(data)
test_socketio.py:121
Function
on_disconnect
(reason)
test_socketio.py:29
Method
on_disconnect
(self)
test_socketio.py:248
Method
on_disconnect
(self)
example/app_namespace.py:89
Method
on_disconnect_request
(self)
example/app_namespace.py:73
Function
on_disconnect_test
()
test_socketio.py:43
Method
on_error
Decorator to define a custom error handler for SocketIO events. This decorator can be applied to a function that acts as an error han
src/flask_socketio/__init__.py:316
Method
on_error_default
Decorator to define a default error handler for SocketIO events. This decorator can be applied to a function that acts as a default e
src/flask_socketio/__init__.py:340
Method
on_exit
(self, data)
test_socketio.py:264
Method
on_join
(self, message)
example/app_namespace.py:46
Function
on_join_room
(data)
test_socketio.py:141
Function
on_join_room_namespace
(data)
test_socketio.py:151
Function
on_json
(data)
test_socketio.py:71
Method
on_json
(self, data)
test_socketio.py:259
Function
on_json_test
(data)
test_socketio.py:83
Method
on_leave
(self, message)
example/app_namespace.py:53
Function
on_leave_room
(data)
test_socketio.py:146
next →
1–100 of 171, ranked by callers