Unknown opened 4 years ago
|
|
Why would you need that check? Any stanza sent using then API will be delivered before another stanza (they are queued internally), so you can just send stanza one after another and the will be delivered (to the server) in proper order. Also, TigaseSwift has support for StreamManagement already in the library - it is used if available by default. All you need to do, is to register |
|
@hantu85 I want to connect in the background, send a message according to the received push notification, and then disconnect from the server but I want to ensure it was sent the stanza before disconnect. |
|
I think that you could just send a message and then call If server properly handles all incoming stanzas before closing the stream (as it should according to the protocol specification) then message should be properly delivered to the XMPP server. |
|
Ok, thanks. |
Following the specification of stream management, I could use the
<r>
and<a>
ensuring the messages the server sends are received for the server and vice-versa... how could I ensure when I'm sending a message that a message was sent before continue sending other messages?