摘要
即時消息(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