#include </data/code/userver/libraries/grpc-proto-structs/include/userver/grpc-proto-structs/server/stream.hpp>
proto-struct based ReaderWriter adapter
If any method throws, further methods must not be called on the same stream.
This class allows the following concurrent calls:
Read
;Write
and there can only be one Read and one Write in flight at a time.
If any method throws, further methods must not be called on the same stream.
Definition at line 99 of file stream.hpp.
Public Types | |
using | ProtobufMessageReaderWriter |
using | RequestMessage = proto_structs::traits::CompatibleMessageType<Request> |
using | ProtobufMessageReader = ugrpc::server::Reader<RequestMessage> |
using | ResponseMessage = proto_structs::traits::CompatibleMessageType<Response> |
using | ProtobufMessageWriter = ugrpc::server::Writer<ResponseMessage> |
Public Member Functions | |
ReaderWriter (ProtobufMessageReaderWriter &reader_writer) | |
bool | Read (Request &request) |
Await and read the next incoming message. | |
void | Write (Response &response) |
Write the next outgoing message. | |
void | Write (Response &response, const grpc::WriteOptions &options) |
void | Write (Response &&response) |
void | Write (Response &&response, const grpc::WriteOptions &options) |
|
inherited |
Definition at line 25 of file stream.hpp.
using grpc_proto_structs::server::ReaderWriter< Request, Response >::ProtobufMessageReaderWriter |
Definition at line 101 of file stream.hpp.
|
inherited |
Definition at line 58 of file stream.hpp.
|
inherited |
Definition at line 24 of file stream.hpp.
|
inherited |
Definition at line 57 of file stream.hpp.
|
inlineexplicit |
Definition at line 104 of file stream.hpp.
|
inlineinherited |
Await and read the next incoming message.
Read protobuf message corresponding to Request
with ugrpc::server::Reader::Read and construct Request
from it.
Definition at line 35 of file stream.hpp.
|
inlineinherited |
Definition at line 74 of file stream.hpp.
|
inlineinherited |
Definition at line 76 of file stream.hpp.
|
inlineinherited |
Write the next outgoing message.
Convert response to corresponding protobuf message and pass it to ugrpc::server::Writer::Write.
Definition at line 68 of file stream.hpp.
|
inlineinherited |
Definition at line 70 of file stream.hpp.