MCPcopy Create free account
hub / github.com/PyQt5/PyQtClient / sendMessage

Method sendMessage

Utils/Application.py:68–76  ·  view source on GitHub ↗
(self, message, msecs=5000)

Source from the content-addressed store, hash-verified

66 print(e)
67
68 def sendMessage(self, message, msecs=5000):
69 if not self._socketOut:
70 return False
71 if not isinstance(message, bytes):
72 message = str(message).encode()
73 self._socketOut.write(message)
74 if not self._socketOut.waitForBytesWritten(msecs):
75 raise Exception("Bytes not written within %ss" % (msecs / 1000.))
76 return True
77
78 def _onNewConnection(self):
79 if self._socketIn:

Callers 1

mainFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected