MCPcopy Create free account
hub / github.com/Comfy-Org/ComfyUI / send_json

Method send_json

server.py:1348–1356  ·  view source on GitHub ↗
(self, event, data, sid=None)

Source from the content-addressed store, hash-verified

1346 await send_socket_catch_exception(self.sockets[sid].send_bytes, message)
1347
1348 async def send_json(self, event, data, sid=None):
1349 message = {"type": event, "data": data}
1350
1351 if sid is None:
1352 sockets = list(self.sockets.values())
1353 for ws in sockets:
1354 await send_socket_catch_exception(ws.send_json, message)
1355 elif sid in self.sockets:
1356 await send_socket_catch_exception(self.sockets[sid].send_json, message)
1357
1358 def send_sync(self, event, data, sid=None):
1359 self.loop.call_soon_threadsafe(

Callers 1

sendMethod · 0.95

Calls 1

Tested by

no test coverage detected