Copied!

BidiStream is the response object from a gRPC bidirectional streaming API call.

CloneableInstantiable
Methods
public __construct(Grpc\BidiStreamingCall $bidiStreamingCall, array $streamingDescriptor = [], ?Psr\Log\LoggerInterface $logger = NULL)
 

BidiStream constructor.

  • param \BidiStreamingCall $bidiStreamingCall The gRPC bidirectional streaming call object
  • param array $streamingDescriptor
  • param null|\LoggerInterface $logger
public closeWrite()
 

Inform the server that no more requests will be written. The write() function cannot be called after closeWrite() is called.

  • throws \ValidationException
public closeWriteAndReadAll()
 

Call closeWrite(), and read all responses from the server, until the streaming call is completed. Throws an ApiException if the streaming call failed.

  • throws \ValidationException
  • throws \ApiException
  • return \Generator|mixed[]
public getBidiStreamingCall()
 

Return the underlying gRPC call object

  • return \Grpc\BidiStreamingCall|mixed
public read()
 

Read the next response from the server. Returns null if the streaming call completed successfully. Throws an ApiException if the streaming call failed.

  • throws \ValidationException
  • throws \ApiException
  • return mixed
public write( $request)
 

Write request to the server.

  • param mixed $request The request to write
  • throws \ValidationException
public writeAll( $requests = [])
 

Write all requests in $requests.

  • param iterable $requests An Iterable of request objects to write to the server
  • throws \ValidationException
Properties
private $call = NULL
private $isComplete = false
private ?Psr\Log\LoggerInterface $logger = NULL
private $pendingResources = []
private $resourcesGetMethod = NULL
private $writesClosed = false
Methods
private getJwtToken(array $headers) : ?array
 
  • param mixed[] $headers
  • return null|array<string, string|false>
private logRequest(Google\Auth\Logging\RpcLogEvent $event) : void
 
  • param \RpcLogEvent $event
private logResponse(Google\Auth\Logging\RpcLogEvent $event) : void
 
  • param \RpcLogEvent $event
private truncatePayload(?string $payload) : ?string
 
  • param null|string $payload
  • return string
© 2026 Bruce Wells
Search Namespaces \ Classes
Configuration