class ClientStream (View source)

ClientStream is the response object from a gRPC client streaming API call.

Methods

__construct(ClientStreamingCall $clientStreamingCall, array $streamingDescriptor = [])

ClientStream constructor.

write(mixed $request)

Write request to the server.

mixed
readResponse()

Read the response from the server, completing the streaming call.

mixed
writeAllAndReadResponse(array $requests)

Write all data in $dataArray and read the response from the server, completing the streaming call.

ClientStreamingCall|mixed
getClientStreamingCall()

Return the underlying gRPC call object

Details

__construct(ClientStreamingCall $clientStreamingCall, array $streamingDescriptor = [])

ClientStream constructor.

Parameters

ClientStreamingCall $clientStreamingCall

The gRPC client streaming call object

array $streamingDescriptor

write(mixed $request)

Write request to the server.

Parameters

mixed $request

The request to write

mixed readResponse()

Read the response from the server, completing the streaming call.

Return Value

mixed

The response object from the server

Exceptions

ApiException

mixed writeAllAndReadResponse(array $requests)

Write all data in $dataArray and read the response from the server, completing the streaming call.

Parameters

array $requests

An iterator of request objects to write to the server

Return Value

mixed

The response object from the server

ClientStreamingCall|mixed getClientStreamingCall()

Return the underlying gRPC call object

Return Value

ClientStreamingCall|mixed