資源簡介
基于Qt實現的多人聊天。一個服務器對應多個客戶端。服務器可以對新加進來的客戶端進行監聽,然后給每個客戶端提示信息。此外還有互發消息功能。先在服務器創建連接進行監聽??蛻舳颂顚懹脩裘M入聊天室后建立連接便可互發消息。

代碼片段和文件信息
#include?“tcpserver.h“
#include?
#include?“tcpclient.h“
int?main(int?argc?char?*argv[])
{
????QApplication?a(argc?argv);
????TcpServer?w;
????w.show();
????TcpClient?w1;
????w1.show();
????TcpClient?w2;
????w2.show();
????return?a.exec();
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-08-01?22:51??manypeople\
?????文件?????????271??2018-08-01?22:51??manypeople\main.cpp
?????文件?????????568??2018-07-26?11:27??manypeople\manypeople.pro
?????文件???????18275??2018-08-01?22:51??manypeople\manypeople.pro.user
?????文件????????1828??2018-07-27?09:59??manypeople\server.cpp
?????文件?????????718??2018-07-27?10:09??manypeople\server.h
?????文件????????5333??2018-07-27?09:19??manypeople\tcpclient.cpp
?????文件????????1252??2018-08-01?11:36??manypeople\tcpclient.h
?????文件????????2819??2018-07-26?13:22??manypeople\tcpclient.ui
?????文件?????????939??2018-07-27?09:58??manypeople\tcpclientsocket.cpp
?????文件?????????657??2018-07-27?10:08??manypeople\tcpclientsocket.h
?????文件?????????631??2018-07-27?09:57??manypeople\tcpserver.cpp
?????文件?????????599??2018-07-27?09:58??manypeople\tcpserver.h
?????文件????????3044??2018-07-26?13:22??manypeople\tcpserver.ui
?????文件????????1467??2018-07-13?09:52??manypeople\utility.cpp
?????文件?????????190??2018-07-13?09:52??manypeople\utility.h
- 上一篇:TCPFileAns.zip
- 下一篇:SpringBoot項目源碼
評論
共有 條評論