using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Threading;namespace TestDemo
{/// <summary>/// 处理TCP数据的类(服务端)/// </summary>public class TcpService{/// <s…
服务端的创建
//创建服务端QTcpServer对象
server new QTcpServer(this);//设置服务端,端口,这里绑定的是主机的所有网卡,
server->listen(QHostAddress::Any, 8080);//绑定连接信号与槽
connect(this->server, &QTcpServer::new…