使用gloox发布Xmpp 5223端口(tls Starttls问题)

时间:2013-12-19 12:25:13

标签: c++ xmpp gloox

XMPP Client需要通过端口5223连接到XMPP servergloox library用于创建XMPP客户端。 但是,我们使用以下方法连接到旧版Jabber SSL端口5223。

############################################################################################################
ConnectionTCPClient* connA = new ConnectionTCPClient(j /*data Handler*/ , j->logInstance() , config.getXMPPServer()/*server*/, 5223 );
        connB = new ConnectionTLS(connA ,j->logInstance());
        connB->handleConnect(connA);
        connB->handleReceivedData(connA,data);
        connB->setConnectionImpl(connA);

#########################################################################################################

我们收到的控制台输出如下:

#############################################################################################################



1387452820log: level: 0 area:8
This is gloox 1.0, connecting to ec2-176-34-52-210.ap-northeast-1.compute.amazonaws.com:5223...
  1387452820log: level: 0 area:32
Connecting to ec2-176-34-52-210.ap-northeast-1.compute.amazonaws.com (10.152.145.189:5223)
  1387452820log: level: 0 area:32
Connected to ec2-176-34-52-210.ap-northeast-1.compute.amazonaws.com (10.152.145.189:5223)
  1387452820Sent XML: <?xml version='1.0' ?><stream:stream to='ec2-176-34-52-210.ap-northeast-1.compute.amazonaws.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'  xml:lang='en' version='1.0'>

#####################################################################################################

BOSH的工作正常。

我们还尝试将gloox源代码更改为使用端口5223而不是5222,但结果是相同的。

使用各种不同的API发送&amp;接收数据,但问题未解决。

请帮助我们解决上述问题。

然而,通过查看控制台输出&amp;在gloox代码中检查相同的似乎是XMPP客户端 连接到XMPP服务器,但它在send&amp;接收。

请帮助我们解决上述问题。

0 个答案:

没有答案