This commit is contained in:
wangzhongjie 2025-04-07 16:19:21 +08:00
commit e4f5240990

View File

@ -1,10 +1,9 @@
import socket from '@ohos.net.socket'; import socket from '@ohos.net.socket';
import hilog from '@ohos.hilog'; import hilog from '@ohos.hilog';
import { getTCP } from './GlobalTcp'; import { getTCP } from './GlobalTcp';
import prompt from '@ohos.prompt';
import FileUtil from './File'; import FileUtil from './File';
import { dateFormat } from './tools'; import { dateFormat } from './tools';
import Prompt from '@system.prompt';
const TAG = 'socketTag[TcpDemo.TcpClient]' const TAG = 'socketTag[TcpDemo.TcpClient]'
export default class TcpClient { export default class TcpClient {
@ -187,7 +186,7 @@ export default class TcpClient {
if (globalThis.tcpUdpError) { if (globalThis.tcpUdpError) {
console.log(TAG,'tcp信号丢失') console.log(TAG,'tcp信号丢失')
// getTCP() // getTCP()
prompt.showToast({ Prompt.showToast({
message: 'tcp信号丢失', message: 'tcp信号丢失',
duration: 2000 duration: 2000
}); });