GRPC C++
0.11.0.0
|
#include <channel.h>
Public Member Functions | |
ClientReaderWriter (Channel *channel, const RpcMethod &method, ClientContext *context) | |
Blocking create a stream. More... | |
void | WaitForInitialMetadata () |
Blocking wait for initial metadata from server. More... | |
bool | Read (R *msg) GRPC_OVERRIDE |
Blocking read a message and parse to msg. More... | |
bool | Write (const W &msg, const WriteOptions &options) GRPC_OVERRIDE |
Blocking write msg to the stream with options. More... | |
bool | WritesDone () GRPC_OVERRIDE |
Block until writes are completed. More... | |
Status | Finish () GRPC_OVERRIDE |
Wait until the stream finishes, and return the final status. More... | |
![]() | |
virtual | ~ClientStreamingInterface () |
![]() | |
virtual | ~WriterInterface () |
bool | Write (const W &msg) |
Blocking write msg to the stream with default options. More... | |
![]() | |
virtual | ~ReaderInterface () |
|
inline |
Blocking create a stream.
|
inlinevirtual |
Wait until the stream finishes, and return the final status.
When the client side declares it has no more message to send, either implicitly or by calling WritesDone(), it needs to make sure there is no more message to be received from the server, either implicitly or by getting a false from a Read().
This function will return either:
Implements grpc::ClientStreamingInterface.
|
inlinevirtual |
Blocking read a message and parse to msg.
Returns true on success.
[out] | msg | The read message. |
Implements grpc::ReaderInterface< R >.
|
inlinevirtual |
Blocking wait for initial metadata from server.
The received metadata can only be accessed after this call returns. Should only be called before the first read. Calling this method is optional, and if it is not called the metadata will be available in ClientContext after the first read.
Implements grpc::ClientReaderWriterInterface< W, R >.
|
inlinevirtual |
Blocking write msg to the stream with options.
msg | The message to be written to the stream. |
options | Options affecting the write operation. |
Implements grpc::WriterInterface< W >.
|
inlinevirtual |
Block until writes are completed.
Implements grpc::ClientReaderWriterInterface< W, R >.