. */ /** * Queue handler for pre-processed outgoing XMPP messages. * Formatted XML stanzas will have been pushed into the queue * via the Queued_XMPP connection proxy, probably from some * other queue processor. * * Here, the XML stanzas are simply pulled out of the queue and * pushed out over the wire; an XmppManager is needed to set up * and maintain the actual server connection. * * This queue will be run via XmppDaemon rather than QueueDaemon. * * @author Brion Vibber */ class XmppOutQueueHandler extends QueueHandler { function transport() { return 'xmppout'; } /** * Take a previously-queued XMPP stanza and send it out ot the server. * @param string $msg * @return boolean true on success */ function handle($msg) { assert(is_string($msg)); $xmpp = XmppManager::get(); $ok = $xmpp->send($msg); return $ok; } }