Thruway\Role\Dealer::processCall PHP Method

processCall() private method

Process call
private processCall ( Session $session, Thruway\Message\CallMessage $msg ) : boolean
$session Thruway\Session
$msg Thruway\Message\CallMessage
return boolean
    private function processCall(Session $session, CallMessage $msg)
    {
        if (!Utils::uriIsValid($msg->getProcedureName())) {
            $session->sendMessage(ErrorMessage::createErrorMessageFromMessage($msg, 'wamp.error.invalid_uri'));
            return;
        }
        if (!isset($this->procedures[$msg->getProcedureName()])) {
            $session->sendMessage(ErrorMessage::createErrorMessageFromMessage($msg, 'wamp.error.no_such_procedure'));
            return;
        }
        /* @var $procedure \Thruway\Procedure */
        $procedure = $this->procedures[$msg->getProcedureName()];
        $call = new Call($session, $msg, $procedure);
        $this->callInvocationIndex[$call->getInvocationRequestId()] = $call;
        $this->callRequestIndex[$msg->getRequestId()] = $call;
        $keepIndex = $procedure->processCall($session, $call);
        if (!$keepIndex) {
            $this->removeCall($call);
        }
    }