powered by Jive Software

Diffrence between sendAsync and sendStanza in smack 4.3.0 beta2


#1

Hi Smack team,

I am using smack version 4.2.3 which is working very fine. I was trying the new beta release of smack 4.3.0 and found there is one new method to send stanza is sendAsync i believe it will send stanza in background thread.

If anyone who have dipper experience with this method can help me to understand the what is the difference between both the way sendStanza and sendAsync and how to measure the performance of both the method.

Your answer will be appriciated !!!

Thanks,
Hiren vavadiya


#2

Both will not send the stanza in the calling thread, sendStanza() has a fire-and-forget semantic, whereas sendAsync() tries to collect a response. See also the its javadoc: http://download.igniterealtime.org/smack/dailybuilds/javadoc/org/jivesoftware/smack/XMPPConnection.html#sendAsync-S-org.jivesoftware.smack.filter.StanzaFilter-


#3

thanks for your quick response i will refer a javadoc as you mentioned.