[Pidgin] #16535: less delay for xmpp file transfer using streamhosts

Pidgin trac at pidgin.im
Thu Jan 15 13:47:40 EST 2015


#16535: less delay for xmpp file transfer using streamhosts
------------------------+------------------------------------------
 Reporter:  evert_mouw  |      Owner:
     Type:  patch       |     Status:  new
Milestone:              |  Component:  libpurple
  Version:  2.10.11     |   Keywords:  XMPP streamhost filetransfer
------------------------+------------------------------------------
 A streamhost is used in xmpp (jabber) as a proxy to stream file contents.

 This patch solves a few issues raised in ticket #14390

 - do not try 0.0.0.0 as streamhost
 - be a little bit smarter about the order of the streamhosts being tried
 - shorten the delay for all cases

 Although the OS should not offer 0.0.0.0 in the first place, this behavior
 is still the case and end user experience is affected. Filtering out
 0.0.0.0 is only one line of code.

 I have decreased the STREAMHOST_CONNECT_TIMEOUT from 15 to 5 seconds. We
 IMHO don't want to extensively try to get a connection with a slow-
 responding proxy. We definitely don't want Pidgin to crash due to long
 timeouts.

 Also I tried to be just a little bit smarter about the order of
 streamhosts being tried.

 - hostnames starting with a letter (not an integer) are tried earlier than
 hostnames that consists just of an IP address
 - streamhosts using port 7777 are very likely proxy65 daemons specially
 configured to act as a streamhost, so they also are tried a bit earlier

 I've tested my code on my Arch Linux machine (current, 64 bit) and when my
 girlfriend from another location tries to send me a file, I no longer have
 to wait 30 seconds. The transfer starts immediately. Note that I have a
 proxy65 installed and configured on another machine, DNS resolvable, with
 port number 7777.

 Cheers, Evert Mouw <post at evert.net>

--
Ticket URL: <https://developer.pidgin.im/ticket/16535>
Pidgin <https://pidgin.im>
Pidgin


More information about the Tracker mailing list