Reference documentation and code samples for the Google API Core Client class BidiStream.
BidiStream is the response object from a gRPC bidirectional streaming API call.
Namespace
Google \ ApiCore
Methods
__construct
BidiStream constructor.
Parameters
Name
Description
bidiStreamingCall
Grpc\BidiStreamingCall
The gRPC bidirectional streaming call object
streamingDescriptor
array
logger
null|Psr\Log\LoggerInterface
write
Write request to the server.
Parameter
Name
Description
request
mixed
The request to write
writeAll
Write all requests in $requests.
Parameter
Name
Description
requests
iterable
An Iterable of request objects to write to the server
closeWrite
Inform the server that no more requests will be written. The write() function cannot be
called after closeWrite() is called.
read
Read the next response from the server. Returns null if the streaming call completed
successfully. Throws an ApiException if the streaming call failed.
Returns
Type
Description
mixed
closeWriteAndReadAll
Call closeWrite(), and read all responses from the server, until the streaming call is
completed. Throws an ApiException if the streaming call failed.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google API Core Client - Class BidiStream (1.36.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.36.1 (latest)](/php/docs/reference/gax/latest/BidiStream)\n- [1.36.0](/php/docs/reference/gax/1.36.0/BidiStream)\n- [1.35.1](/php/docs/reference/gax/1.35.1/BidiStream) \nReference documentation and code samples for the Google API Core Client class BidiStream.\n\nBidiStream is the response object from a gRPC bidirectional streaming API call.\n\nNamespace\n---------\n\nGoogle \\\\ ApiCore\n\nMethods\n-------\n\n### __construct\n\nBidiStream constructor.\n\n### write\n\nWrite request to the server.\n\n### writeAll\n\nWrite all requests in $requests.\n\n### closeWrite\n\nInform the server that no more requests will be written. The write() function cannot be\ncalled after closeWrite() is called.\n\n### read\n\nRead the next response from the server. Returns null if the streaming call completed\nsuccessfully. Throws an ApiException if the streaming call failed.\n\n### closeWriteAndReadAll\n\nCall closeWrite(), and read all responses from the server, until the streaming call is\ncompleted. Throws an ApiException if the streaming call failed.\n\n### getBidiStreamingCall\n\nReturn the underlying gRPC call object"]]