public function mrecv($mode = 0)
    {
        if ($this->verbose) {
            $this->getLogger()->debug('PRE RECV: '.$this->id);
        }
        $data = array();
        while (true) {
            $data[] = $this->recv($mode);
            if (!$this->getSockOpt(ZMQ::SOCKOPT_RCVMORE)) {
                break;
            }
        }

        $message = new Message($data);
        if ($this->verbose) {
            $this->getLogger()->debug('RECV: '.$this->id);
            $this->getLogger()->debug($message);
        }

        if (ZMQ::SOCKET_ROUTER === $this->getSocketType()) {
            $message->stripRoutingInformation();
        }

        return $message;
    }
public function mrecv($mode = 0)
    {
        if ($this->verbose) {
            $this->getLogger()->debug('PRE RECV: '.$this->id);
        }
        $data = array();
        while (true) {
            $data[] = $this->recv($mode);
            if (!$this->getSockOpt(ZMQ::SOCKOPT_RCVMORE)) {
                break;
            }
        }

        $message = new Message($data);
        if ($this->verbose) {
            $this->getLogger()->debug('RECV: '.$this->id);
            $this->getLogger()->debug($message);
        }

        if (ZMQ::SOCKET_ROUTER === $this->getSocketType()) {
            $message->stripRoutingInformation();
        }

        return $message;
    }
public function mrecv ( $ mode = 0 ) { if ( $ this -> verbose ) { $ this -> getLogger ( ) -> debug ( 'PRE RECV: ' . $ this -> id ) ; } $ data = array ( ) ; while ( true ) { $ data [ ] = $ this -> recv ( $ mode ) ; if ( ! $ this -> getSockOpt ( ZMQ :: SOCKOPT_RCVMORE ) ) { break ; } } $ message = new Message ( $ data ) ; if ( $ this -> verbose ) { $ this -> getLogger ( ) -> debug ( 'RECV: ' . $ this -> id ) ; $ this -> getLogger ( ) -> debug ( $ message ) ; } if ( ZMQ :: SOCKET_ROUTER === $ this -> getSocketType ( ) ) { $ message -> stripRoutingInformation ( ) ; } return $ message ; }
Receive a Message.

Use this instead of {@see ::recv}.

@param int $mode

@return \AlphaRPC\Common\Socket\Message
Receive a Message .