public function call(ClientSession $session, $procedureName, $arguments = null, $argumentsKw = null, $options = null)
{
//This promise gets resolved in Caller::processResult
$futureResult = new Deferred();
$requestId = Utils::getUniqueId();
$this->callRequests[$requestId] = ["procedure_name" => $procedureName, "future_result" => $futureResult];
if (is_array($options)) {
$options = (object) $options;
}
if (!is_object($options)) {
if ($options !== null) {
Logger::warning($this, "Options don't appear to be the correct type.");
}
$options = new \stdClass();
}
$callMsg = new CallMessage($requestId, $options, $procedureName, $arguments, $argumentsKw);
$session->sendMessage($callMsg);
return $futureResult->promise();
}