摘要
作为跨平台应用程序和UI开发框架,Qt被越来越多地用于应用程序的开发上。而网络程序又是软件开发的主要内容之一,文中对如何利用Qt开发TCP网络程序进行了研究。通过新建TCPServer类和TCPSocket类,分别继承自Qt里封装好的QTCPServer类和QTCPSocket类,完成服务器和套接字的建立与连接,从而实现了搭建针对多客户端的服务器。
As a good cross-platform application and UI development framework, Qt is increasingly used in ap-plication development, in which the web application is one of the main aspects. This paper discusses the use of Qt todevelop the procedures of TCP network. The server and socket connection are established by using new Qt encapsula-ted TCPServer class and TCPSocket class inherited from QTCPServer class and QTCPSocket class respectively, so asto realize the set for the server to several clients.
出处
《电子科技》
2015年第3期76-78,82,共4页
Electronic Science and Technology
关键词
服务器
多客户端
Qt
TCP
server
several clients