(self, message, msecs=5000)
| 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: |