1、 局域网即时通讯系统的实现 LAN instant messaging system is realized I 摘 要 随着计算机科学和Internet 的飞速发展, 网上聊天已成为人们相互交流的一 种方式, 与E-mail、电话相比, 聊天服务更具有实时性和有效性。大多数网络通 讯都需要借助Internet上的服务器,这就给那些具有大规模内部网络的用户造成 了许多问题,如浪费网络资源、遭遇到网络攻击、传播的病毒、破坏防御系统 等等。由于互连网上的网络通讯工具给企业内部信息交流带来了不便,所以为 了方便内部网络的用户之间的沟通,需要开发一个基于局域网的信息收发系统 的即时通讯工具,实现在内部
2、网络中进行信息的交流。该软件能够帮助企业在 局域网内搭建起自己的聊天系统,避免企业内部员工使用类似QQ等软件泄露 内部信息,但是该软件只实现了聊天和传送文件以及抓取屏幕等功能,还有很 多不足之处需要改进。 本文提出一个运行于VC平台上的局域网聊天软件的解决方案。该聊天软 件集服务器端和客户端两个模块于一体,可设置为客户端或者服务器端或者两 者兼容等模式,提供TCP/UDP两种传输模式作选择。服了服务器模式主要实现 务器的配置和数据的传递;客户端模式主要对服务器端进行通讯。该软件采用 异步套接字的非阻塞模式,并实现对象的序列化和MFC文件对象实现数据的保 存。 关键关键词词:局域网 即时通信 套
3、接字 异步模式 II Abstract Along with the high-speed development of the computer science and Internet, chatting on line has been an important method in our communication. Comparing with E-mail and telephone, the chat-line service is more real-time and effective. Most network communications require the help
4、 of servers on the Internet, which has caused many problems to the Large-scale internal network users, such as a waste of network resources, network attacks, viruses, damage defense systems and so on. As the interconnection network of online communication tools has brought inconvenience to the enter
5、prise , it is need to develop a LAN-based messaging system to facilitate users and achieve the exchange of information. This software can help the company to build their own chatting system in the local area network, and it also can avoid the staff of the company disclosing the insider information b
6、y using the other software such as QQ, but this software has only completed the basic function as a chatting system, so it need much more improvement. This thesis proposes a solution of a LAN chatting software based on C+ language, which is operated on the VC platform. This chatting software set two modules: the server and the client in one,. which can be set either one or both compatible with TCP/UDP two transport mode choices. The server module mainly completes the sever devices configura