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

Async server-side API for doing bidirectional streaming RPCs, where the incoming message stream coming from the client has messages of type R, and the outgoing message stream coming from the server has messages of type W. More...

#include <server_context.h>

Public Member Functions

 ServerAsyncReaderWriter (grpc::ServerContext *ctx)
 
void SendInitialMetadata (void *tag) override
 See ServerAsyncStreamingInterface::SendInitialMetadata for semantics. More...
 
void Read (R *msg, void *tag) override
 
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 ServerAsyncReaderWriterInterface.WriteAndFinish method for semantics. More...
 
void Finish (const grpc::Status &status, void *tag) override
 See the ServerAsyncReaderWriterInterface.Finish method for semantics. More...
 

Friends

class grpc::Server
 

Detailed Description

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

Async server-side API for doing bidirectional streaming RPCs, where the incoming message stream coming from the client has messages of type R, and the outgoing message stream coming from the server has messages of type W.

Constructor & Destructor Documentation

◆ ServerAsyncReaderWriter()

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

Member Function Documentation

◆ Finish()

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

See the ServerAsyncReaderWriterInterface.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.

◆ Read()

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

◆ SendInitialMetadata()

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

◆ Write() [1/2]

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

◆ Write() [2/2]

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

◆ WriteAndFinish()

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

See the ServerAsyncReaderWriterInterface.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.

Friends And Related Function Documentation

◆ grpc::Server

template<class W , class R >
friend class grpc::Server
friend

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