Subject: Is an unavailable presence sent out when network disconnects?
I notice that when a device is disconnected from a network, eventually the OnClose() method fires. Does an unavailable presence automatically get sent out to all subscribers?
For example, if I have a cell phone with no Data service (only Wifi). If I walk out of range of the wifi, will an unavailable presence be automatically sent out by the server?
And another scenario; assume there are two clients, Client A and Client B. Also assume that Client B is abnormally disconnected from Wifi, but still appears as available. If client A sends a message to client B, when the server receives the message from A, will it attempt to send it to B? Although B is offline, but still appears as available, what will happen? Will the message get stored on the server and be sent to client B when he is actually back online, or will it send it to B instantly, and assume that B received it (meaning the message is lost)?
I think this blog post details my concerns:
http://op-co.de/blog/posts/XEP-0198/
(But does stream management determine whether client B actually received the msg?)
Would using SendAndAck() instead of just Send() solve this issue? For example, will the Callback function be triggered when the message has been confirmed to be delivered to the other user? Or will it let me know that, even though the other user appears to be available, the message was not actually delivered?
Digging deeper, I found the property XmppClient.StreamManagement. I realized I do not have this set to true (it is not being set in my code at all). By setting it to true, will that completely solve my issue above? Or is it already set to true by default?
Note: I am already using message delivery receipts, and its working fine, except for the above scenario (the server sends the msg to the offline client who still appears available, therefore the client can never sent a receipt back to the sender).
For example, if I have a cell phone with no Data service (only Wifi). If I walk out of range of the wifi, will an unavailable presence be automatically sent out by the server?
And another scenario; assume there are two clients, Client A and Client B. Also assume that Client B is abnormally disconnected from Wifi, but still appears as available. If client A sends a message to client B, when the server receives the message from A, will it attempt to send it to B? Although B is offline, but still appears as available, what will happen? Will the message get stored on the server and be sent to client B when he is actually back online, or will it send it to B instantly, and assume that B received it (meaning the message is lost)?
I think this blog post details my concerns:
http://op-co.de/blog/posts/XEP-0198/
(But does stream management determine whether client B actually received the msg?)
Would using SendAndAck() instead of just Send() solve this issue? For example, will the Callback function be triggered when the message has been confirmed to be delivered to the other user? Or will it let me know that, even though the other user appears to be available, the message was not actually delivered?
Digging deeper, I found the property XmppClient.StreamManagement. I realized I do not have this set to true (it is not being set in my code at all). By setting it to true, will that completely solve my issue above? Or is it already set to true by default?
Note: I am already using message delivery receipts, and its working fine, except for the above scenario (the server sends the msg to the offline client who still appears available, therefore the client can never sent a receipt back to the sender).
This post was edited 5 times, last on 2017-02-09, 12:02 by Stei.