|
bool | Read (Request &request) |
| Await and read the next incoming message.
|
|
void | Write (const Response &response) |
| Write the next outgoing message.
|
|
void | Finish () |
| Complete the RPC successfully.
|
|
void | FinishWithError (const grpc::Status &status) override |
| Complete the RPC with an error.
|
|
void | WriteAndFinish (const Response &response) |
| Equivalent to Write + Finish
|
|
| BidirectionalStream (impl::CallParams &&call_params, impl::RawReaderWriter< Request, Response > &stream) |
| For internal use only.
|
|
| BidirectionalStream (const BidirectionalStream &)=delete |
|
| BidirectionalStream (BidirectionalStream &&)=delete |
|
bool | IsFinished () const override |
|
| CallAnyBase (impl::CallParams &¶ms) |
|
grpc::ServerContext & | GetContext () |
|
std::string_view | GetCallName () const |
| Name of the call. Consists of service and method names.
|
|
tracing::Span & | GetSpan () |
|
template<typename Request, typename Response>
class ugrpc::server::BidirectionalStream< Request, Response >
Controls a request stream -> response stream RPC.
This class is not thread-safe except for GetContext
.
The RPC is cancelled on destruction unless the stream has been finished.
If any method throws, further methods must not be called on the same stream, except for GetContext
.
Definition at line 226 of file rpc.hpp.
template<typename Request , typename Response >
Equivalent to Write + Finish
This call saves one round-trip, compared to separate Write
and Finish
.
Finish
must not be called multiple times.
- Parameters
-
response | the final response message |
- Exceptions
-
Definition at line 510 of file rpc.hpp.