* 2) override handleInput() with what to do when data is waiting on
* one of the sockets
* 3) override idle($timeout) to do keepalives (if necessary)
- * 4) implement send_raw_message() to send raw data that ImPlugin::enqueue_outgoing_raw
+ * 4) implement send_raw_message() to send raw data that ImPlugin::enqueueOutgoingRaw
* enqueued
*/
function __construct($imPlugin)
{
$this->plugin = $imPlugin;
- //TODO We only really want to register this event if this is the thread that runs the ImManager
- Event::addHandler('EndInitializeQueueManager', array($this, 'onEndInitializeQueueManager'));
+ $this->plugin->imManager = $this;
}
/**
{
throw new Exception('ImManager should be created using it\'s constructor, not the static get method');
}
-
- /**
- * Register notice queue handler
- *
- * @param QueueManager $manager
- *
- * @return boolean hook return
- */
- function onEndInitializeQueueManager($manager)
- {
- $manager->connect($this->plugin->transport . '-out', new ImSenderQueueHandler($this->plugin, $this), 'imdaemon');
- return true;
- }
}