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

#include <async_stream.h>

Public Member Functions

 ServerAsyncReaderWriter (ServerContext *ctx)
 
void SendInitialMetadata (void *tag) GRPC_OVERRIDE
 
void Read (R *msg, void *tag) GRPC_OVERRIDE
 Read a message of type R into msg. More...
 
void Write (const W &msg, void *tag) GRPC_OVERRIDE
 Request the writing of msg with identifying tag tag. More...
 
void Finish (const Status &status, void *tag) GRPC_OVERRIDE
 
- Public Member Functions inherited from grpc::ServerAsyncStreamingInterface
virtual ~ServerAsyncStreamingInterface ()
 
- Public Member Functions inherited from grpc::AsyncWriterInterface< W >
virtual ~AsyncWriterInterface ()
 
- Public Member Functions inherited from grpc::AsyncReaderInterface< R >
virtual ~AsyncReaderInterface ()
 

Friends

class ::grpc::Server
 

Constructor & Destructor Documentation

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

Member Function Documentation

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

Read a message of type R into msg.

Completion will be notified by tag on the associated completion queue. This is thread-safe with respect to Write or WritesDone methods. It should not be called concurrently with other streaming APIs on the same stream. It is not meaningful to call it concurrently with another Read on the same stream since reads on the same stream are delivered in order.

Parameters
[out]msgWhere to eventually store the read message.
[in]tagThe tag identifying the operation.

Implements grpc::AsyncReaderInterface< R >.

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

Request the writing of msg with identifying tag tag.

Only one write may be outstanding at any given time. This means that after calling Write, one must wait to receive tag from the completion queue BEFORE calling Write again. This is thread-safe with respect to Read

Parameters
[in]msgThe message to be written.
[in]tagThe tag identifying the operation.

Implements grpc::AsyncWriterInterface< W >.

Friends And Related Function Documentation

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

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