QT客户端服务器直播
QT客户端服务器直播,单客客户端流畅运行,多客户端线程问题,SocketHandler::SocketHandler(QTcpSocket *socket, QObject *parent) :clientSocket(socket) { //readyRead--->当套接字中有数据可读取时,触发当前信号 connect(clientSocket, SIGNAL(readyRead()), this, SLOT(readyReadSlot())); } void SocketHandler::registUser(const pack_t &pack;) { QString na me = QString::fromLocal8Bit(pack.name); QString pwd = QString::fromLocal8Bit(pack.pwd); User user(name, pwd); UserHandler uh; bool ret = uh.insertUser(user); pack_t packRet; memset(&packRet;, 0, sizeof(packRet)); me = QString::fromLocal8Bit(pack.name); QString pwd = QString::fromLocal8Bit(pack.pwd); User user(name, pwd); UserHandler uh; bool ret = uh.insertUser(user); pack_t packRet; memset(&packRet;, 0, sizeof(packRet));
用户评论