summaryrefslogtreecommitdiff
path: root/lib/jabber.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-07-09 12:09:20 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-07-09 12:09:20 -0400
commit03200235b1a1bba56c24e1bb659023ba24265eb3 (patch)
tree44f921927809cdf03b2f3c4b9ee2f89b9b226486 /lib/jabber.php
parent1daad01f362d72e6ed89f415546220016c32404a (diff)
use select() to bring down xmpp latency
Diffstat (limited to 'lib/jabber.php')
-rw-r--r--lib/jabber.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/jabber.php b/lib/jabber.php
index 7d584ad01..e15076160 100644
--- a/lib/jabber.php
+++ b/lib/jabber.php
@@ -77,6 +77,14 @@ function jabber_daemon_address()
return common_config('xmpp', 'user') . '@' . common_config('xmpp', 'server');
}
+class Sharing_XMPP extends XMPPHP_XMPP
+{
+ function getSocket()
+ {
+ return $this->socket;
+ }
+}
+
/**
* connect the configured Jabber account to the configured server
*
@@ -89,7 +97,7 @@ function jabber_connect($resource=null)
{
static $conn = null;
if (!$conn) {
- $conn = new XMPPHP_XMPP(common_config('xmpp', 'host') ?
+ $conn = new Sharing_XMPP(common_config('xmpp', 'host') ?
common_config('xmpp', 'host') :
common_config('xmpp', 'server'),
common_config('xmpp', 'port'),