/** * Call a remote method that takes a stream of arguments and has a single * output. * * @param string $method The name of the method to call * @param $arguments An array or Traversable of arguments to stream to the * server * @param callable $deserialize A function that deserializes the response * @param array $metadata A metadata map to send to the server * * @return ClientStreamingSurfaceActiveCall The active call object */ public function _clientStreamRequest($method, callable $deserialize, $metadata = []) { list($actual_metadata, $timeout) = $this->_extract_timeout_from_metadata($metadata); $call = new ClientStreamingCall($this->channel, $method, $deserialize, $timeout); $jwt_aud_uri = $this->_get_jwt_aud_uri($method); if (is_callable($this->update_metadata)) { $actual_metadata = call_user_func($this->update_metadata, $actual_metadata, $jwt_aud_uri); } $actual_metadata = $this->_validate_and_normalize_metadata($actual_metadata); $call->start($actual_metadata); return $call; }
/** * Call a remote method that takes a stream of arguments and has a single * output. * * @param string $method The name of the method to call * @param $arguments An array or Traversable of arguments to stream to the * server * @param callable $deserialize A function that deserializes the response * @param array $metadata A metadata map to send to the server * * @return ClientStreamingSurfaceActiveCall The active call object */ public function _clientStreamRequest($method, callable $deserialize, $metadata = [], $options = []) { $call = new ClientStreamingCall($this->channel, $method, $deserialize, $options); $jwt_aud_uri = $this->_get_jwt_aud_uri($method); if (is_callable($this->update_metadata)) { $metadata = call_user_func($this->update_metadata, $metadata, $jwt_aud_uri); } $metadata = $this->_validate_and_normalize_metadata($metadata); $call->start($metadata); return $call; }
/** * Call a remote method that takes a stream of arguments and has a single * output * * @param string $method The name of the method to call * @param $arguments An array or Traversable of arguments to stream to the * server * @param callable $deserialize A function that deserializes the response * @param array $metadata A metadata map to send to the server * @return ClientStreamingSurfaceActiveCall The active call object */ public function _clientStreamRequest($method, $arguments, callable $deserialize, $metadata = array()) { $call = new ClientStreamingCall($this->channel, $method, $deserialize); $call->start($arguments, $metadata); return $call; }