您当前的位置: 首页 >  服务器

鱼儿-1226

暂无认证

  • 0浏览

    0关注

    1100博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

agsxmpp 和 openfire 服务器 通信

鱼儿-1226 发布时间:2022-02-28 10:23:00 ,浏览量:0

如题, 一直做c#, 最近做openfire 开发,所以我选择 agsxmpp 做测试的客户端,以下是遇到的问题及解决方法 1. openfire  发送数据流  是通过 PLAIN 的 , 而 agsxmpp 是默认是 通过DIGEST-MD5 发送 2. openfire 发送iq节  不接收 to属性 集体解决方案 1. 修改 agsxmpp 里的Mechanism.cs 里                        //case "DIGEST-MD5": //我加的 注释掉  case "DIGEST-MD5": 使plain 变为   默认设置                     //return MechanismType.DIGEST_MD5;   注释 case “Digest-md5” ,从而把agsxmpp的 默认发式 改为 PLAIN 2.修改 agsxmpp IqGrabber.cs  里的 public void SendIq(IQ iq, IqCB cb, object cbArg) 函数        修改后如:  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在agsxmpp中发送Iq节的时候先iq.RemoveAttribute("to")                 iq.RemoveAttribute("to");             }          m_connection.Send(iq);      }

关注
打赏
1604459285
查看更多评论
立即登录/注册

微信扫码登录

0.0369s