Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
cj_sutherland #1
Member since Sep 2008 · 3 posts · Location: New Zealand
Group memberships: Members
Show profile · Link to this post
Subject: Detecting end of send
Is there anyway to tell that a message has been sent? We went to start a connection, send a message, wait for it to be sent and then close the connection.
Avatar
Jabberer #2
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
when no error occured after send, and the xmpp server returns no xmpp error message then the message was sent and delivered.
If you send messages to federated xmpp users then the error response of the server can be delayed depending on the s2s timeout of your server.

If you need a even more reliable data transport than xmpp offers by default then take a look at XEP-0079 Advanced Message Processing
Software Developer
AG-Software
Avatar
cj_sutherland #3
Member since Sep 2008 · 3 posts · Location: New Zealand
Group memberships: Members
Show profile · Link to this post
That's what I thought originally, but if I close the client straight after the send, then no message is sent.


Craig
Avatar
Jabberer #4
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
This is possible when you send lots of messages because agsXMPP is using async socket functions only. Try to wait some seconds before you close the socket.

Its on our TODO list to add a synchronous send, or an async send with OnSent callback which would help in the case.
Software Developer
AG-Software
This post was edited on 2008-09-19, 01:03 by Alex.
Avatar
cj_sutherland #5
Member since Sep 2008 · 3 posts · Location: New Zealand
Group memberships: Members
Show profile · Link to this post
Thanks, that's exactly what I'd be looking for :)

I've had a quick look at the code and I could submit a patch if that would help.
Avatar
Alex #6
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
fell free to post a patch here in the forums, or attach it to a post.

Alex
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: agsXMPP RSS