Reference documentation and code samples for the Google API Core Client class ClientStream.
ClientStream is the response object from a gRPC client streaming API call.
Namespace
Google \ ApiCoreMethods
__construct
ClientStream constructor.
| Parameters | |
|---|---|
| Name | Description |
clientStreamingCall |
Grpc\ClientStreamingCall
The gRPC client streaming call object |
streamingDescriptor |
array
|
logger |
null|Psr\Log\LoggerInterface
A PSR-3 compliant logger. |
write
Write request to the server.
| Parameter | |
|---|---|
| Name | Description |
request |
mixed
The request to write |
readResponse
Read the response from the server, completing the streaming call.
| Returns | |
|---|---|
| Type | Description |
mixed |
The response object from the server |
writeAllAndReadResponse
Write all data in $dataArray and read the response from the server, completing the streaming call.
| Parameter | |
|---|---|
| Name | Description |
requests |
array
An iterator of request objects to write to the server |
| Returns | |
|---|---|
| Type | Description |
mixed |
The response object from the server |
getClientStreamingCall
Return the underlying gRPC call object
| Returns | |
|---|---|
| Type | Description |
Grpc\ClientStreamingCall|mixed |
|