更新代码

This commit is contained in:
feiyangqingyun
2022-01-13 11:28:44 +08:00
parent b6424990d9
commit 293fa97173
75 changed files with 938 additions and 264 deletions

View File

@@ -33,7 +33,7 @@ void frmMain::initForm()
ui->tabWidget->addTab(new frmWebClient, "WEB客户端");
ui->tabWidget->addTab(new frmWebServer, "WEB服务端");
#endif
#ifdef emsdk
#ifdef Q_OS_WASM
AppConfig::CurrentIndex = 4;
#endif
}

View File

@@ -212,6 +212,8 @@ void frmTcpServer::on_btnListen_clicked()
if (isOk) {
append(0, "监听成功");
ui->btnListen->setText("关闭");
} else {
append(2, QString("监听失败: %1").arg(server->errorString()));
}
} else {
isOk = false;

View File

@@ -242,8 +242,10 @@ void frmUdpServer::on_btnListen_clicked()
if (ui->btnListen->text() == "监听") {
bool ok = socket->bind(QHostAddress(AppConfig::UdpListenIP), AppConfig::UdpListenPort);
if (ok) {
ui->btnListen->setText("关闭");
append(0, "监听成功");
ui->btnListen->setText("关闭");
} else {
append(2, QString("监听失败: %1").arg(socket->errorString()));
}
} else {
socket->abort();

View File

@@ -210,6 +210,8 @@ void frmWebServer::on_btnListen_clicked()
if (isOk) {
append(0, "监听成功");
ui->btnListen->setText("关闭");
} else {
append(2, QString("监听失败: %1").arg(server->errorString()));
}
} else {
isOk = false;