summaryrefslogtreecommitdiff
path: root/extlib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-08-30 05:57:09 -0400
committerEvan Prodromou <evan@prodromou.name>2008-08-30 05:57:09 -0400
commit0217a74f130ee8075537a4f1316f554c25d51fe2 (patch)
treeb94061ba4973cacaa68636e4d60c04b1e8d82d34 /extlib
parentc46f152697b7abfe6a33bec38c6b793e288d85c8 (diff)
check the state of the queue before diving in to process it
darcs-hash:20080830095709-84dde-a64262c1b32e506cb2c43f8b4fb55ab88effc22f.gz
Diffstat (limited to 'extlib')
-rw-r--r--extlib/XMPPHP/XMLStream.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/extlib/XMPPHP/XMLStream.php b/extlib/XMPPHP/XMLStream.php
index 4de23ef7f..62aa4de89 100644
--- a/extlib/XMPPHP/XMLStream.php
+++ b/extlib/XMPPHP/XMLStream.php
@@ -616,4 +616,12 @@ class XMPPHP_XMLStream {
xml_set_element_handler($this->parser, 'startXML', 'endXML');
xml_set_character_data_handler($this->parser, 'charXML');
}
+
+ public function readyToProcess() {
+ $read = array($this->socket);
+ $write = null;
+ $except = null;
+ $updated = @stream_select($read, $write, $except, 0);
+ return $updated !== false;
+ }
}