Connect agsxmpp client to openfire

Source: Internet
Author: User

Connect agsxmpp to openfire
You need to modify the source code as follows:
1. Modify the Mechanism. cs file in agsxmpp.
// Case "DIGEST-MD5": // comment out case "DIGEST-MD5": Change plain to default
// Return MechanismType. DIGEST_MD5;

Comment case "Digest-md5" to change the default agsxmpp style to PLAIN

2. Modify the public void SendIq (IQ iq, IqCB cb, object cbArg) function in agsxmpp IqGrabber. cs.
After modification, for example, public void SendIq (IQ iq, IqCB cb, object cbArg)
// Check if the callback is null, in case of wrong usage of this class
If (cb! = Null)
TrackerData td = new TrackerData ();
Td. cb = cb;
Td. data = cbArg;

M_grabbing [iq. Id] = td;

// Iq. RemoveAttribute ("")
Iq. RemoveAttribute ("");
M_connection.Send (iq );
3. The openfire XMPP server listens only to IPV4 addresses by default, while the IPV6 version address is selected when the agsxmpp server is connected to the server.
Modify IPAddress ipAddress = ipHostInfo. AddressList [0] In ClientSocket. cs; change IPAddress ipAddress = ipHostInfo. AddressList [2];
Otherwise, the server will be rejected.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.