GRPC C++  1.66.0
Public Member Functions
grpc::ServerAsyncWriter< W > Class Template Reference

Async server-side API for doing server streaming RPCs, where the outgoing message stream from the server has messages of type W. More...

#include <server_context.h>

Public Member Functions

 ServerAsyncWriter (grpc::ServerContext *ctx)
 
void SendInitialMetadata (void *tag) override
 See ServerAsyncStreamingInterface::SendInitialMetadata for semantics. More...
 
void Write (const W &msg, void *tag) override
 
void Write (const W &msg, grpc::WriteOptions options, void *tag) override
 
void WriteAndFinish (const W &msg, grpc::WriteOptions options, const grpc::Status &status, void *tag) override
 See the ServerAsyncWriterInterface.WriteAndFinish method for semantics. More...
 
void Finish (const grpc::Status &status, void *tag) override
 See the ServerAsyncWriterInterface.Finish method for semantics. More...
 

Detailed Description

template<class W>
class grpc::ServerAsyncWriter< W >

Async server-side API for doing server streaming RPCs, where the outgoing message stream from the server has messages of type W.

Constructor & Destructor Documentation

◆ ServerAsyncWriter()

template<class W >
grpc::ServerAsyncWriter< W >::ServerAsyncWriter ( grpc::ServerContext ctx)
inlineexplicit

Member Function Documentation

◆ Finish()

template<class W >
void grpc::ServerAsyncWriter< W >::Finish ( const grpc::Status status,
void *  tag 
)
inlineoverride

See the ServerAsyncWriterInterface.Finish method for semantics.

Implicit input parameter:

  • the ServerContext associated with this call is used for sending trailing (and initial if not already sent) metadata to the client.

Note: there are no restrictions are the code of status,it may be non-OK

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

◆ SendInitialMetadata()

template<class W >
void grpc::ServerAsyncWriter< W >::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.
Parameters
[in]tagTag identifying this request.

◆ Write() [1/2]

template<class W >
void grpc::ServerAsyncWriter< W >::Write ( const W &  msg,
grpc::WriteOptions  options,
void *  tag 
)
inlineoverride

◆ Write() [2/2]

template<class W >
void grpc::ServerAsyncWriter< W >::Write ( const W &  msg,
void *  tag 
)
inlineoverride

◆ WriteAndFinish()

template<class W >
void grpc::ServerAsyncWriter< W >::WriteAndFinish ( const W &  msg,
grpc::WriteOptions  options,
const grpc::Status status,
void *  tag 
)
inlineoverride

See the ServerAsyncWriterInterface.WriteAndFinish method for semantics.

Implicit input parameter:

  • the ServerContext associated with this call is used for sending trailing (and initial) metadata to the client.

Note: status must have an OK code.

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


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