Class BidiStreamingCall
Represents an active call that allows for sending and recieving messages
in streams in any order.
-
Grpc\AbstractCall
-
Grpc\BidiStreamingCall
Methods summary
public
|
#
start( array $metadata = [] )
Start the call.
Parameters
- $metadata
Metadata to send with the call, if applicable
(optional)
|
public
mixed
|
#
read( )
Reads the next value from the server.
Reads the next value from the server.
Returns
mixed The next value from the server, or null if there is none
|
public
|
#
write( ByteBuffer $data, array $options = [] )
Write a single message to the server. This cannot be called after
writesDone is called.
Write a single message to the server. This cannot be called after
writesDone is called.
Parameters
- $data
- The data to write
- $options
An array of options, possible keys:
'flags' => a number (optional)
|
public
|
#
writesDone( )
Indicate that no more writes will be sent.
Indicate that no more writes will be sent.
|
public
stdClass
|
#
getStatus( )
Wait for the server to send the status, and return it.
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
|