Grpc\BaseStub::_bidiRequest PHP Method

_bidiRequest() public method

Call a remote method with messages streaming in both directions.
public _bidiRequest ( string $method, callable $deserialize, array $metadata = [], $options = [] ) : grpc\BidiStreamingSurfaceActiveCall
$method string The name of the method to call
$deserialize callable A function that deserializes the responses
$metadata array A metadata map to send to the server
return grpc\BidiStreamingSurfaceActiveCall The active call object
    public function _bidiRequest($method, callable $deserialize, $metadata = [], $options = [])
    {
        $call = new BidiStreamingCall($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;
    }