GRPC PHP  1.66.0
Public Member Functions
Grpc\ClientStreamingCall Class Reference

Represents an active call that sends a stream of messages and then gets a single response. More...

Public Member Functions

 start (array $metadata=[])
 Start the call. More...
 
 write ($data, array $options=[])
 Write a single message to the server. More...
 
 wait ()
 Wait for the server to respond with data and a status. More...
 
- Public Member Functions inherited from Grpc\AbstractCall
 __construct (Channel $channel, $method, $deserialize, array $options=[])
 Create a new Call wrapper object. More...
 
 getMetadata ()
 
 getTrailingMetadata ()
 
 getPeer ()
 
 cancel ()
 Cancels the call. More...
 
 setCallCredentials ($call_credentials)
 Set the CallCredentials for the underlying Call. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Grpc\AbstractCall
 _serializeMessage ($data)
 Serialize a message to the protobuf binary format. More...
 
 _deserializeResponse ($value)
 Deserialize a response value to an object. More...
 
- Protected Attributes inherited from Grpc\AbstractCall
 $call
 
 $deserialize
 
 $metadata
 
 $trailing_metadata
 

Detailed Description

Represents an active call that sends a stream of messages and then gets a single response.

Member Function Documentation

◆ start()

Grpc\ClientStreamingCall::start ( array  $metadata = [])

Start the call.

Parameters
array$metadataMetadata to send with the call, if applicable (optional)

◆ wait()

Grpc\ClientStreamingCall::wait ( )

Wait for the server to respond with data and a status.

Returns
array [response data, status]

◆ write()

Grpc\ClientStreamingCall::write (   $data,
array  $options = [] 
)

Write a single message to the server.

This cannot be called after wait is called.

Parameters
ByteBuffer$dataThe data to write
array$optionsAn array of options, possible keys: 'flags' => a number (optional)

The documentation for this class was generated from the following file: