GRPC PHP  1.66.0
Public Member Functions
Grpc\BidiStreamingCall Class Reference

Represents an active call that allows for sending and receiving messages in streams in any order. More...

Public Member Functions

 start (array $metadata=[])
 Start the call. More...
 
 read ()
 Reads the next value from the server. More...
 
 write ($data, array $options=[])
 Write a single message to the server. More...
 
 writesDone ()
 Indicate that no more writes will be sent. More...
 
 getStatus ()
 Wait for the server to send the status, and return it. 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 allows for sending and receiving messages in streams in any order.

Member Function Documentation

◆ getStatus()

Grpc\BidiStreamingCall::getStatus ( )

Wait for the server to send the status, and return it.

Returns
\stdClass The status object, with integer $code, string $details, and array $metadata members

◆ read()

Grpc\BidiStreamingCall::read ( )

Reads the next value from the server.

Returns
mixed The next value from the server, or null if there is none

◆ start()

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

Start the call.

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

◆ write()

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

Write a single message to the server.

This cannot be called after writesDone is called.

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

◆ writesDone()

Grpc\BidiStreamingCall::writesDone ( )

Indicate that no more writes will be sent.


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