3

I'm using XMPPFramework in my iOS app to send and receive command messages between client and server. The server would answer to different command messages immediately.

Sometime the connection is very slow, the message sent from client would have no response for a long time. So I want to know how can I send an XMPP message with timeout or I have to implement this myself.

Anyway:

  1. This goes to - (void)xmppStream:(XMPPStream *)sender didSendMessage:(XMPPMessage *)message.
  2. Using Reachability, the internet is still reachable via [[Reachability reachabilityForInternetConnection] isReachable].
Protocole
  • 1,733
  • 11
  • 28
  • 42

1 Answers1

0

Why not just set a timer when you send the message, override the response callback on the XMPPStream, and see which is called first?

paulmelnikow
  • 16,895
  • 8
  • 63
  • 114