class ServerStream (View source)

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

Methods

__construct(ServerStreamingCallInterface $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.

getServerStreamingCall()

Return the underlying call object.

Details

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

ServerStream constructor.

Parameters

ServerStreamingCallInterface $serverStreamingCall

The 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

ServerStreamingCallInterface getServerStreamingCall()

Return the underlying call object.