xmpp messages are lost when client connection lost suddently

后端 未结 4 1493
谎友^
谎友^ 2020-12-24 04:57

I am using ejabberd server and ios xmppframework. there are two clients, A and B.

  1. When A and B are online, A can send message to B successfu
4条回答
  •  不知归路
    2020-12-24 05:36

    If B goes offline suddenly then user A have to check if B is online/offline while sending message to user B. If user B is offline then user A have to upload that message on Server using Web service. And user B have to call web service on below function.

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    

    So user B will get that all offline message which was lost due to connection Lost.

提交回复
热议问题