class ServerStream (View source)

ServerStream is the response object from a gRPC server streaming API call.

Methods

__construct(ServerStreamingCall $serverStreamingCall, array $streamingDescriptor = [])

ServerStream constructor.

Generator|mixed
readAll()

A generator which yields results from the server until the streaming call completes. Throws an ApiException if the streaming call failed.

ServerStreamingCall|mixed
getServerStreamingCall()

Return the underlying gRPC call object

Details

__construct(ServerStreamingCall $serverStreamingCall, array $streamingDescriptor = [])

ServerStream constructor.

Parameters

ServerStreamingCall $serverStreamingCall

The gRPC server streaming call object

array $streamingDescriptor

Generator|mixed readAll()

A generator which yields results from the server until the streaming call completes. Throws an ApiException if the streaming call failed.

Return Value

Generator|mixed

Exceptions

ApiException

ServerStreamingCall|mixed getServerStreamingCall()

Return the underlying gRPC call object

Return Value

ServerStreamingCall|mixed