Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
大多数 XmppClient 都是异步工作的。当您调用像 client.Open() 这样的函数时,它会立即返回,但您需要等待它引发 OnBind() 事件,然后才能对 mucManager 执行任何操作。例如:
Most of XmppClient works asynchronously. When you call someting like client.Open(), it returns immediately but you need to wait for it to raise the OnBind() event before doing anything with the mucManager. For example:
所以看起来这个问题的答案一直是我原来的首选库(Soapbox Studio SDK)实际上支持 TLS 加密,因此一直是最佳选择。看起来 TLS 似乎没有很好的记录和/或我错过了这个功能。
根据您的服务器配置(我使用的是 Openfire 服务器),您应该能够将服务器配置为仅接受加密连接。不是使用 SSL(Openfire 是其服务器中已弃用的进程)并尝试通过 SSL 端口 5223 进行连接,而是简单地通过默认端口 (5222) 连接并要求加密连接将强制客户端使用以下方式发送数据: TLS 并自动协商握手。服务器还可以配置为阻止客户端创建其他用户。通过控制哪些客户端能够在您的服务器上创建 XMPP 用户而不是颁发 SSL 证书,您可以从根本上确保整个通信的安全。
So it looks as though all along that the answer to this question was that my original preferred library, (Soapbox Studio SDK) does in fact support TLS encryption and therefore was by best choice all along. It looks as though TLS is just not well documented and/or I missed this feature.
Depending upon your server configuration ( I am using an Openfire Server ), you should be able to configure your server to only accept encrypted connections. Rather than using the SSL (which Openfire is the process of deprecated from its server ) and attempting to connect over the SSL port 5223, Simply connected over the default port (5222) and requiring an encrypted connection will force the client to send the data using TLS and automatically negotiate the handshake. Also the server can be configured to prevent clients from creating additional users. By controlling which clients are able to create XMPP users on your server rather than issuing SSL certificates you therefore essentially ensure secure communication throughout.