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.