BidiStream
class BidiStream
BidiStream is the response object from a gRPC bidirectional streaming API call.
Methods
BidiStream constructor.
Write request to the server.
Write all requests in $requests.
Inform the server that no more requests will be written. The write() function cannot be called after closeWrite() is called.
Read the next response from the server. Returns null if the streaming call completed successfully. Throws an ApiException if the streaming call failed.
Call closeWrite(), and read all responses from the server, until the streaming call is completed. Throws an ApiException if the streaming call failed.
Return the underlying gRPC call object
Details
at line 53
__construct(BidiStreamingCall $bidiStreamingCall, array $streamingDescriptor = [])
BidiStream constructor.
at line 67
write(mixed $request)
Write request to the server.
at line 86
writeAll(mixed[] $requests = [])
Write all requests in $requests.
at line 97
closeWrite()
Inform the server that no more requests will be written. The write() function cannot be called after closeWrite() is called.
at line 118
mixed
read()
Read the next response from the server. Returns null if the streaming call completed successfully. Throws an ApiException if the streaming call failed.
at line 157
Generator|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.
at line 172
BidiStreamingCall|mixed
getBidiStreamingCall()
Return the underlying gRPC call object