文档介绍:基于Socket的局域网通信工具的设计与实现的方法
摘要
的飞速发展,网上聊天已成为人们相互交流的一中方式,与E-mail、电话相比,聊天服务更具有实时性和有效性。网络版的聊天软件种类繁多,如QQ、OICQ、MSN等,实现随时随地上网聊天,给人们带来了很大的方便。但是这些聊天软件也存在以下不足:;用户在工作时容易沉迷于网络聊天。为了方便单位企业内部的信息交流,避免企业内部员工使用类似QQ等软件泄露内部信息,减少不必要的财力和人力资源浪费,开发一个局域网聊天软件是非常必要的。
通过对局域网络通信的学习研究,本文介绍了局域网通信和实现聊天器基本通信功能的流程,并编写了一个基于Winsock的局域网络聊天器系统。本系统是运行于MFC平台上的Winsock局域网聊天软件,该聊天软件采用C/S结构,包括服务器和客户端两个模块,客户端通过服务端进行通信。服务器模块主要实现了服务器的配置和数据的传递;客户端模块主要实现了用户注册、登录、文字聊天和文件传送等功能。该软件采用多线程技术支持多用户操作,并采用相关技术进行了优化,加快了文字传递速度。主要用到了Winsock编程技术、TCP/IP协议、多线程技术、数据库存取技术和各种控件编程技术。
本文主要分为六个章节,第一章概括的说明聊天器的背景及应用。第二章阐述实现局域网络聊天器系统所用到的主要技术。第三章根据聊天器的设计实现进行需求分析。第四章详细描述了本系统各个模块的设计。第五章重点介绍各个模块的实现和测试。第六章是结束语,总结毕业设计中遇到的问题和自己的收获,感谢给予指导和帮组的老师和同学。
关键词:局域网;TCP/IP协议;Winsock;多线程
Abstract
With puter science and the rapid development of , online chat has e a way of mutual exchange of one, and E-mail, phone calls with real-time chat services and more effective. Online chat software, a wide variety, such as QQ, OICQ, MSN and so on, to achieve anytime, anywhere access to chat, to bring a great convenience. But the lack of chat software, there are the following: the user must be connected to ; users to work easily addicted to online chat. To facilitate the exchange of information within business units to avoid the use of internal staff and other software like QQ leaked internal information to reduce unnecessary waste of financial and human resources to develop a LAN chat software is very necessary.
Through the study of local munication, this article describes munication and implementation of local work chat munication process device, and write a Winsock-based local work chat control system. The system is running on the platform at the MFC Winsock LAN chat software, chat software with the C / S structure, including both server and client modules, the client side municate through the service. Server module main achievement of the server's configuration and data transfer; client module main achievement of the user registration, login, text chat and