Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
dmex #1
Member since Jul 2010 · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: keep-alive ping
The KeepAliveTick shouldnt be sending a blank space, It should be sending a Ping-IQ. All other xmpp clients use xmpp-ping for their keep-alive and  Servers that dont support xmpp-ping (xep-0199) are required by the standards to reply with service-unavailable stanza.

Change the KeepAliveTick in XmppConnection.cs from:
  1. private void KeepAliveTick(Object state)
  2. {
  3.      // Send a Space for Keep Alive
  4.      Send(" ");
  5. }

to:
  1. private void KeepAliveTick(Object state)
  2. {
  3.  // Send a ping for Keep Alive
  4.    agsXMPP.protocol.extensions.ping.PingIq ping = new protocol.extensions.ping.PingIq();
  5.    ping.Type = protocol.client.IqType.get;
  6.  
  7.    Send(ping);
  8. }
This post was edited on 2014-12-23, 18:56 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
no, the KeepAlive is to prevent NAT timeouts on the tcp level.
The XMPP Ping is meant for other purposes, its for detecting dead connection on the XMPP stream level or measure response time on your connection.

What has do be done is reply automatically on requests. Because the MLink server sends XMPP Pings when there were no stanzas received for a while and kicks the connection when it gets no response to the request. But this can be done on the client level, you have to respond there to every Iq anyway.

Alex
Avatar
IrQ #3
Member since Oct 2010 · 6 posts
Group memberships: Members
Show profile · Link to this post
Hello Alex!
I've extended agsXMPP library by adding XEP-0199 (ping) support (for example, so i've added some more extensions). How can I commit it to svn?
Avatar
Alex #4
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by IrQ:
How can I commit it to svn?

you can't. You can send a patch to me, then I take a look at it.

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