GRPC C++  1.66.0
Public Member Functions | Friends
grpc::ClientReaderWriter< W, R > Class Template Reference

Synchronous (blocking) client-side API for bi-directional streaming RPCs, where the outgoing message stream coming from the client has messages of type W, and the incoming messages stream coming from the server has messages of type R. More...

#include <client_context.h>

Public Member Functions

void WaitForInitialMetadata () override
 Block waiting to read initial metadata from the server. More...
 
bool NextMessageSize (uint32_t *sz) override
 
bool Read (R *msg) override
 See the ReaderInterface.Read method for semantics. More...
 
bool Write (const W &msg, grpc::WriteOptions options) override
 
bool WritesDone () override
 
grpc::Status Finish () override
 See the ClientStreamingInterface.Finish method for semantics. More...
 

Friends

class internal::ClientReaderWriterFactory< W, R >
 

Detailed Description

template<class W, class R>
class grpc::ClientReaderWriter< W, R >

Synchronous (blocking) client-side API for bi-directional streaming RPCs, where the outgoing message stream coming from the client has messages of type W, and the incoming messages stream coming from the server has messages of type R.

Member Function Documentation

◆ Finish()

template<class W , class R >
grpc::Status grpc::ClientReaderWriter< W, R >::Finish ( )
inlineoverride

See the ClientStreamingInterface.Finish method for semantics.

Side effect:

  • the ClientContext associated with this call is updated with possible trailing metadata sent from the server.

◆ NextMessageSize()

template<class W , class R >
bool grpc::ClientReaderWriter< W, R >::NextMessageSize ( uint32_t *  sz)
inlineoverride

◆ Read()

template<class W , class R >
bool grpc::ClientReaderWriter< W, R >::Read ( R *  msg)
inlineoverride

See the ReaderInterface.Read method for semantics.

Side effect: Also receives initial metadata if not already received (updates the ClientContext associated with this call in that case).

◆ WaitForInitialMetadata()

template<class W , class R >
void grpc::ClientReaderWriter< W, R >::WaitForInitialMetadata ( )
inlineoverride

Block waiting to read initial metadata from the server.

This call is optional, but if it is used, it cannot be used concurrently with or after the Finish method.

Once complete, the initial metadata read from the server will be accessible through the ClientContext used to construct this object.

◆ Write()

template<class W , class R >
bool grpc::ClientReaderWriter< W, R >::Write ( const W &  msg,
grpc::WriteOptions  options 
)
inlineoverride

◆ WritesDone()

template<class W , class R >
bool grpc::ClientReaderWriter< W, R >::WritesDone ( )
inlineoverride

Friends And Related Function Documentation

◆ internal::ClientReaderWriterFactory< W, R >

template<class W , class R >
friend class internal::ClientReaderWriterFactory< W, R >
friend

The documentation for this class was generated from the following files: