Cognition of the agsXMPP

xiaoxiao2021-03-20  204

What the XMPP protocol depict, In fact, it is totally the exchange of the XML datas between the client and server. Using the object-oriented thinking to describe the XML fragments as Jabber packets is the common way. I had read some open source projects About Jabber Both In C # and Java, The Designers Think in The Same Way. The Structure. The Structure. The Structure. The Structure.

When The Socket Receives Data from The Sender, It all pushes to the streamparser. The streout., Streamparser paars. ...............................

As The Process of Parsing, The StreamParser Will Trigger The Following Four Events.

1.StreamParser_onstreamStart2.StreamParser_onstreamEn 3.StreamParser_onstreamElement 4.streamParser_onstreamError

When receiving "

Send:

xmlns: stream = 'http: //etherx.jabber.org/streams'> ", StreamParser will trigger the streamParser_OnStreamStart evnet In responding the event we (the server) need the user to authenticate or register..

1.Authentication:

IF The Client Want To Login in At The Moment, It Should Request The Server for login-in information.

The Side of Client May Do As Follows:

RequestLoginInfo () Asking for Imformation of Login-in from The Server

ONGETAUTHINFO () WHEN Receiving The Information, It Will Prepare To Send The Request.

Onauthenticate () As the response from the server, it autheticate the user WHether is The Member of the server. If Yes, Then

REQUESTAGENTS () And Requestroster () (The function is easy to kown it's means) to be pay ....

转载请注明原文地址:https://www.9cbs.com/read-130422.html

New Post(0)