def start(self):
self.startButton.setEnabled(False)
QApplication.setOverrideCursor(Qt.WaitCursor)
self.bytesWritten = 0
self.bytesReceived = 0
while not self.tcpServer.isListening() and not self.tcpServer.listen():
ret = QMessageBox.critical(self, "Loopback",
"Unable to start the test: %s." % self.tcpServer.errorString(),
QMessageBox.Retry | QMessageBox.Cancel)
if ret == QMessageBox.Cancel:
return
self.serverStatusLabel.setText("Listening")
self.clientStatusLabel.setText("Connecting")
self.tcpClient.connectToHost(QHostAddress(QHostAddress.LocalHost), self.tcpServer.serverPort())
评论列表
文章目录