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

Async server-side API for doing client-streaming RPCs, where the incoming message stream from the client has messages of type R, and the single response message sent from the server is type W. More...

#include <server_context.h>

Public Member Functions

 ServerAsyncReader (grpc::ServerContext *ctx)
 
void SendInitialMetadata (void *tag) override
 See ServerAsyncStreamingInterface::SendInitialMetadata for semantics. More...
 
void Read (R *msg, void *tag) override
 
void Finish (const W &msg, const grpc::Status &status, void *tag) override
 See the ServerAsyncReaderInterface.Read method for semantics. More...
 
void FinishWithError (const grpc::Status &status, void *tag) override
 See the ServerAsyncReaderInterface.Read method for semantics. More...
 

Detailed Description

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

Async server-side API for doing client-streaming RPCs, where the incoming message stream from the client has messages of type R, and the single response message sent from the server is type W.

Constructor & Destructor Documentation

◆ ServerAsyncReader()

template<class W , class R >
grpc::ServerAsyncReader< W, R >::ServerAsyncReader ( grpc::ServerContext ctx)
inlineexplicit

Member Function Documentation

◆ Finish()

template<class W , class R >
void grpc::ServerAsyncReader< W, R >::Finish ( const W &  msg,
const grpc::Status status,
void *  tag 
)
inlineoverride

See the ServerAsyncReaderInterface.Read method for semantics.

Side effect:

  • also sends initial metadata if not already sent.
  • uses the ServerContext associated with this call to send possible initial and trailing metadata.

Note: msg is not sent if status has a non-OK code.

gRPC doesn't take ownership or a reference to msg and status, so it is safe to deallocate once Finish returns.

◆ FinishWithError()

template<class W , class R >
void grpc::ServerAsyncReader< W, R >::FinishWithError ( const grpc::Status status,
void *  tag 
)
inlineoverride

See the ServerAsyncReaderInterface.Read method for semantics.

Side effect:

  • also sends initial metadata if not already sent.
  • uses the ServerContext associated with this call to send possible initial and trailing metadata.

gRPC doesn't take ownership or a reference to status, so it is safe to to deallocate once FinishWithError returns.

◆ Read()

template<class W , class R >
void grpc::ServerAsyncReader< W, R >::Read ( R *  msg,
void *  tag 
)
inlineoverride

◆ SendInitialMetadata()

template<class W , class R >
void grpc::ServerAsyncReader< W, R >::SendInitialMetadata ( void *  tag)
inlineoverride

See ServerAsyncStreamingInterface::SendInitialMetadata for semantics.

Implicit input parameter:

  • The initial metadata that will be sent to the client from this op will be taken from the ServerContext associated with the call.

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