MCPcopy Create free account
hub / github.com/pywebio/PyWebIO / send_msg_to_client

Method send_msg_to_client

pywebio/platform/tornado.py:320–327  ·  view source on GitHub ↗
(self, session)

Source from the content-addressed store, hash-verified

318 closed = False
319
320 def send_msg_to_client(self, session):
321 for msg in session.get_task_commands():
322 try:
323 self.write_message(json.dumps(msg))
324 except TypeError as e:
325 logger.exception('Data serialization error: %s\n'
326 'This may be because you pass the wrong type of parameter to the function'
327 ' of PyWebIO.\nData content: %s', e, msg)
328
329 def open(self):
330 if SingleSessionWSHandler.session is None:

Callers

nothing calls this directly

Calls 2

get_task_commandsMethod · 0.45
write_messageMethod · 0.45

Tested by

no test coverage detected