MCPcopy Create free account
hub / github.com/GCWing/BitFun / create_room_ws

Function create_room_ws

src/apps/relay-server/test_incremental_upload.py:113–125  ·  view source on GitHub ↗

Create a room via WebSocket and return the connection (kept alive).

(room_id: str)

Source from the content-addressed store, hash-verified

111
112
113async def create_room_ws(room_id: str):
114 """Create a room via WebSocket and return the connection (kept alive)."""
115 ws = await websockets.connect(WS_URL)
116 await ws.send(json.dumps({
117 "type": "create_room",
118 "room_id": room_id,
119 "device_id": f"test-{room_id}",
120 "device_type": "desktop",
121 "public_key": "dGVzdA==",
122 }))
123 resp = await asyncio.wait_for(ws.recv(), timeout=5)
124 data = json.loads(resp)
125 return ws, data
126
127
128async def run_tests():

Callers 1

run_testsFunction · 0.85

Calls 3

connectMethod · 0.65
sendMethod · 0.45
recvMethod · 0.45

Tested by

no test coverage detected