Synchronizing message sending and receiving AGSXMPP

708 Views Asked by At

I am developing a communication layer between client and server using XMPP in c#. 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?

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.

1

There are 1 best solutions below

0
On BEST ANSWER

You can use standard XMPP IQ requests with your own payload. 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.