GRPC C++  1.30.0
Public Member Functions
grpc_impl::ServerAsyncResponseWriter< W > Class Template Referencefinal

Async server-side API for handling unary calls, where the single response message sent to the client is of type W. More...

#include <async_unary_call_impl.h>

Public Member Functions

 ServerAsyncResponseWriter (::grpc_impl::ServerContext *ctx)
 
void SendInitialMetadata (void *tag) override
 See ServerAsyncStreamingInterface::SendInitialMetadata for semantics. More...
 
void Finish (const W &msg, const ::grpc::Status &status, void *tag)
 Indicate that the stream is to be finished and request notification when the server has sent the appropriate signals to the client to end the call. More...
 
void FinishWithError (const ::grpc::Status &status, void *tag)
 Indicate that the stream is to be finished with a non-OK status, and request notification for when the server has finished sending the appropriate signals to the client to end the call. More...
 
- Public Member Functions inherited from grpc::internal::ServerAsyncStreamingInterface
virtual ~ServerAsyncStreamingInterface ()
 

Detailed Description

template<class W>
class grpc_impl::ServerAsyncResponseWriter< W >

Async server-side API for handling unary calls, where the single response message sent to the client is of type W.

Constructor & Destructor Documentation

◆ ServerAsyncResponseWriter()

template<class W >
grpc_impl::ServerAsyncResponseWriter< W >::ServerAsyncResponseWriter ( ::grpc_impl::ServerContext ctx)
inlineexplicit

Member Function Documentation

◆ Finish()

template<class W >
void grpc_impl::ServerAsyncResponseWriter< W >::Finish ( const W &  msg,
const ::grpc::Status status,
void *  tag 
)
inline

Indicate that the stream is to be finished and request notification when the server has sent the appropriate signals to the client to end the call.

Should not be used concurrently with other operations.

Parameters
[in]tagTag identifying this request.
[in]statusTo be sent to the client as the result of the call.
[in]msgMessage to be sent to the client.

Side effect:

  • also sends initial metadata if not already sent (using the ServerContext associated with this call).

Note: if status has a non-OK code, then msg will not be sent, and the client will receive only the status with possible trailing metadata.

◆ FinishWithError()

template<class W >
void grpc_impl::ServerAsyncResponseWriter< W >::FinishWithError ( const ::grpc::Status status,
void *  tag 
)
inline

Indicate that the stream is to be finished with a non-OK status, and request notification for when the server has finished sending the appropriate signals to the client to end the call.

Should not be used concurrently with other operations.

Parameters
[in]tagTag identifying this request.
[in]statusTo be sent to the client as the result of the call.
  • Note: status must have a non-OK code.

Side effect:

  • also sends initial metadata if not already sent (using the ServerContext associated with this call).

◆ SendInitialMetadata()

template<class W >
void grpc_impl::ServerAsyncResponseWriter< W >::SendInitialMetadata ( void *  tag)
inlineoverridevirtual

See ServerAsyncStreamingInterface::SendInitialMetadata for semantics.

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

Parameters
[in]tagTag identifying this request.

Implements grpc::internal::ServerAsyncStreamingInterface.


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