MCPcopy Create free account
hub / github.com/miguelgrinberg/python-socketio / test_connect

Function test_connect

examples/server/asgi/app.py:82–87  ·  view source on GitHub ↗
(sid, environ)

Source from the content-addressed store, hash-verified

80
81@sio.on('connect')
82async def test_connect(sid, environ):
83 global background_task_started
84 if not background_task_started:
85 sio.start_background_task(background_task)
86 background_task_started = True
87 await sio.emit('my_response', {'data': 'Connected', 'count': 0}, room=sid)
88
89
90@sio.on('disconnect')

Callers

nothing calls this directly

Calls 2

start_background_taskMethod · 0.45
emitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…