Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
walladev #1
Member since Apr 2012 · 13 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to detect Xmpp Client lost connection to xmpp server
Hi Alex,

I use Xmpp client to connect to Xmpp server. The connection is lost by any condition ( lost internet connection, ...). I want to ask you that Matrix can give me any property or event to catch that problem immediately.


Thanks,
This post was edited on 2013-02-01, 04:13 by walladev.
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
when MatriX detects the connection loss it raises the OnClose event.
Avatar
walladev #3
Member since Apr 2012 · 13 posts
Group memberships: Members
Show profile · Link to this post
Quote by Alex:
when MatriX detects the connection loss it raises the OnClose event.

Tried to use this event. It is working. But I saw that Matrix need to take some seconds to raise OnClose event. In that period, i can not
send successfully message to server. So, Matrix  has  any event which  confirm the message reaches to the xmpp Server or any property notify immediately to me xmpp connection lost.

Thanks,
This post was edited on 2013-02-01, 04:22 by walladev.
Avatar
Alex #4
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by walladev:
So, Matrix  has  any event which  confirm the message reaches to the xmpp Server
no, if you need to guarantee that you have to use something like acks or message receipts.
XEP-0184: Message Delivery Receipts
XEP-0198: Stream Management

for one of our next updates its on our TODO list offer a callback when a packet was send successful. But this doesn't really help you because the message routing can still fail on the server, on the connection between server and client2, or on client2.

Quote by walladev:
or any property notify immediately to me xmpp connection lost.
OnClose, as I said before.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS