class ClientStream

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

Methods

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

ClientStream constructor.

static callable
createApiCall(callable $callable, mixed[] $grpcStreamingDescriptor)

No description

write(mixed $request)

Write request to the server.

mixed
readResponse()

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

mixed
writeAllAndReadResponse(mixed[] $requests)

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

ClientStreamingCall
getClientStreamingCall()

Return the underlying gRPC call object

Details

at line 49
__construct(ClientStreamingCall $clientStreamingCall, array $grpcStreamingDescriptor = [])

ClientStream constructor.

Parameters

ClientStreamingCall $clientStreamingCall The gRPC client streaming call object
array $grpcStreamingDescriptor

at line 59
static callable createApiCall(callable $callable, mixed[] $grpcStreamingDescriptor)

Parameters

callable $callable
mixed[] $grpcStreamingDescriptor

Return Value

callable ApiCall

at line 72
write(mixed $request)

Write request to the server.

Parameters

mixed $request The request to write

at line 83
mixed readResponse()

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

Return Value

mixed The response object from the server

Exceptions

ApiException

at line 100
mixed writeAllAndReadResponse(mixed[] $requests)

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

Parameters

mixed[] $requests An iterator of request objects to write to the server

Return Value

mixed The response object from the server

at line 113
ClientStreamingCall getClientStreamingCall()

Return the underlying gRPC call object

Return Value

ClientStreamingCall