/**
* Main processing loop. Also called from send(), you should call this in
* your own application in order to continue reading events and responses
* from ami.
*
* @return $this
*/
public function process()
{
$results = $this->getEventManager()->trigger(__FUNCTION__ . '.pre', $this);
if ($results->stopped()) {
return $this;
}
$this->connection->process();
$this->getEventManager()->trigger(__FUNCTION__ . '.post', $this);
return $this;
}