MCPcopy Create free account
hub / github.com/Improbable-AI/VisionProTeleop / on_open

Method on_open

avp_stream/streamer.py:1519–1536  ·  view source on GitHub ↗
(ws)

Source from the content-addressed store, hash-verified

1517 import websocket
1518
1519 def on_open(ws):
1520 self._log('[SIGNALING] WebSocket connected', force=True)
1521 self._signaling_ws = ws
1522 self._signaling_connected = True
1523
1524 # Join the room
1525 join_msg = json.dumps({
1526 "type": "join",
1527 "room": self._room_code,
1528 "role": "python"
1529 })
1530 ws.send(join_msg)
1531 self._log(f'[SIGNALING] Joining room: {self._room_code}')
1532
1533 # Request ICE servers
1534 ice_req = json.dumps({"type": "request-ice"})
1535 ws.send(ice_req)
1536 self._log('[SIGNALING] Requested ICE servers')
1537
1538 def on_message(ws, message):
1539 try:

Callers

nothing calls this directly

Calls 3

_logMethod · 0.95
sendMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected