function onMessage(ProcConnection $conn, $data) {
        if ($this->_status == self::STATUS_INIT)
            return;
        $data = self::_parseTex($data);
        if ($data === false)
            return;
        if ($this->_status == self::STATUS_FORMULA) {
            $this->_formula = $data;
            $this->_id = self::genPic($data);
            $this->_status = self::STATUS_RESULT;
            $conn->send($this->_current->withEval());
        } else {
            $message = $this->_current->getMessage();
            msg_send(Captcha::getQueue(), 1, [$this->_id, $message, $data]);
            if (msg_stat_queue(Captcha::getQueue())['msg_qnum'] < Config::get('CAPTCHA_CACHE_MAX')) {
                $this->generate();
            } else {
                $this->_status = self::STATUS_INIT;
            }
        }
    }
function onMessage(ProcConnection $conn, $data) {
        if ($this->_status == self::STATUS_INIT)
            return;
        $data = self::_parseTex($data);
        if ($data === false)
            return;
        if ($this->_status == self::STATUS_FORMULA) {
            $this->_formula = $data;
            $this->_id = self::genPic($data);
            $this->_status = self::STATUS_RESULT;
            $conn->send($this->_current->withEval());
        } else {
            $message = $this->_current->getMessage();
            msg_send(Captcha::getQueue(), 1, [$this->_id, $message, $data]);
            if (msg_stat_queue(Captcha::getQueue())['msg_qnum'] < Config::get('CAPTCHA_CACHE_MAX')) {
                $this->generate();
            } else {
                $this->_status = self::STATUS_INIT;
            }
        }
    }
function onMessage ( ProcConnection $ conn , $ data ) { if ( $ this -> _status == self :: STATUS_INIT ) return ; $ data = self :: _parseTex ( $ data ) ; if ( $ data === false ) return ; if ( $ this -> _status == self :: STATUS_FORMULA ) { $ this -> _formula = $ data ; $ this -> _id = self :: genPic ( $ data ) ; $ this -> _status = self :: STATUS_RESULT ; $ conn -> send ( $ this -> _current -> withEval ( ) ) ; } else { $ message = $ this -> _current -> getMessage ( ) ; msg_send ( Captcha :: getQueue ( ) , 1 , [ $ this -> _id , $ message , $ data ] ) ; if ( msg_stat_queue ( Captcha :: getQueue ( ) ) [ 'msg_qnum' ] < Config :: get ( 'CAPTCHA_CACHE_MAX' ) ) { $ this -> generate ( ) ; } else { $ this -> _status = self :: STATUS_INIT ; } } }
Call when process output message.

@param ProcConnection $conn
@param $data
Call when process output message .