(self, message, msecs=5000)
| 92 | self._activationWindow.activateWindow() |
| 93 | |
| 94 | def sendMessage(self, message, msecs=5000): |
| 95 | if not self._socketOut: |
| 96 | return False |
| 97 | if not isinstance(message, bytes): |
| 98 | message = str(message).encode() |
| 99 | self._socketOut.write(message) |
| 100 | if not self._socketOut.waitForBytesWritten(msecs): |
| 101 | raise RuntimeError("Bytes not written within %ss" % |
| 102 | (msecs / 1000.)) |
| 103 | return True |
| 104 | |
| 105 | def _onNewConnection(self): |
| 106 | if self._socketIn: |