# Google API Core Client - Class ClientStream (1.43.0)

1.43.0 (latest) 1.42.5 1.40.0 1.38.2 1.36.1 1.35.1 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 \\ ApiCore

## Methods

### __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` |   |