摘要
即时消息(Instant Messaging,IM)是一种新兴的互联网交流方式,它具有实时性、在线性等一些很好的特性.目前IM已经成为继Email、Web之后的第三大互联网应用,基于IM 的技术仍然在发展中,也出现了一些和IM 相关的研究问题。XMPP(Extensible Messaging and Presence Protocol)协议以XML为基础,利用XMPP协议可以自定义出符合各种实际应用场合的即时通讯协议。本文介绍了如何利用XMPP协议定义一套通讯协议,并使用.Net的C#技术实现的一套简单通讯系统。该系统利用.net的System.XML下的相关类库实现了消息的生成和解析,利用System.Net.Sockets和System.Threading实现客户端和服务器,客户端和客户端的连接通讯。服务器负责维护用户信息和好友列表,客户端可以实现多对多的在线聊天。
关键词:XMPP,XML,即时通讯,Socket
ABSTRACT
IM (Instant Messaging) is a new way of Internet communication, it is real-time, online and some very good features. IM has now become the third-largest Internet-based application after the Email, Web applications. IM technology is still in development, there have been some, and IM-related research questions. XMPP (Extensible Messaging and Presence Protocol) protocol is XML based. Using XMPP protocol can customize a variety of practical applications that meet real-time communication protocol. This article describes how to use the XMPP protocol defines a set of communication protocols, using the DotNet's C# implementation of a simple communication system. The system uses. Net the System.XML class library implemented under the related information generation and analysis, using System.Net.Sockets and System.Threading achieve client to server, client to client to connect communications.Server is responsible for maintaining user information and friends list, the client can achieve many to many on-line chat.
Keywords: XMPP, XML, Instant Messaging, Socket