简体   繁体   English

同步消息发送和接收AGSXMPP

[英]Synchronizing message sending and receiving AGSXMPP

I am developing a communication layer between client and server using XMPP in c#. 我正在使用C#中的XMPP开发客户端和服务器之间的通信层。 The requirement is to send message from client and halt execution until a reply is received from server. 要求是从客户端发送消息并暂停执行,直到从服务器收到答复为止。 Is there any way of doing that using agsXMPP? 使用agsXMPP有什么办法吗?

Another thing is I don't want server to synchronize the message sending/receiving. 另一件事是我不希望服务器同步消息的发送/接收。 It should be only client waiting for the reply. 应该只有客户端在等待答复。 Server should work asynchronously. 服务器应异步工作。

Please help if there is any thing available. 如果有任何可用的东西,请帮助。

You can use standard XMPP IQ requests with your own payload. 您可以将标准XMPP IQ请求与您自己的有效负载一起使用。 IQs are specially designed for situations when reply is required. 智商是专门为需要回复的情况而设计的。

In agsXMPP there is an IqGrabber class, which can be used to send query and perform callbacks on the query response. 在agsXMPP中,存在一个IqGrabber类,该类可用于发送查询和对查询响应执行回调。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM