Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
grpc::ClientWriter< W > Class Template Reference

#include <channel_interface.h>

Public Member Functions

grpc::Status Finish () override
 
void WaitForInitialMetadata ()
 
bool Write (const W &msg, grpc::WriteOptions options) override
 
bool WritesDone () override
 

Private Member Functions

template<class R >
 ClientWriter (grpc::ChannelInterface *channel, const grpc::internal::RpcMethod &method, grpc::ClientContext *context, R *response)
 

Private Attributes

grpc::internal::Call call_
 
grpc::ClientContextcontext_
 
grpc::CompletionQueue cq_
 
grpc::internal::CallOpSet< grpc::internal::CallOpRecvInitialMetadata, grpc::internal::CallOpGenericRecvMessage, grpc::internal::CallOpClientRecvStatusfinish_ops_
 

Friends

class internal::ClientWriterFactory< W >
 

Detailed Description

template<class W>
class grpc::ClientWriter< W >

Synchronous (blocking) client-side API for doing client-streaming RPCs, where the outgoing message stream coming from the client has messages of type W.

Definition at line 33 of file grpcpp/impl/codegen/channel_interface.h.

Constructor & Destructor Documentation

◆ ClientWriter()

template<class W >
template<class R >
grpc::ClientWriter< W >::ClientWriter ( grpc::ChannelInterface channel,
const grpc::internal::RpcMethod method,
grpc::ClientContext context,
R *  response 
)
inlineprivate

Block to create a stream (i.e. send request headers and other initial metadata to the server). Note that context will be used to fill in custom initial metadata. response will be filled in with the single expected response message from the server upon a successful call to the Finish method of this instance.

Definition at line 381 of file grpcpp/impl/codegen/sync_stream.h.

Member Function Documentation

◆ Finish()

template<class W >
grpc::Status grpc::ClientWriter< W >::Finish ( )
inlineoverride

See the ClientStreamingInterface.Finish method for semantics. Side effects:

  • Also receives initial metadata if not already received.
  • Attempts to fill in the response parameter passed to the constructor of this instance with the response message from the server.

Definition at line 361 of file grpcpp/impl/codegen/sync_stream.h.

◆ WaitForInitialMetadata()

template<class W >
void grpc::ClientWriter< W >::WaitForInitialMetadata ( )
inline

See the ClientStreamingInterface.WaitForInitialMetadata method for semantics. Once complete, the initial metadata read from the server will be accessible through the ClientContext used to construct this object.

Definition at line 309 of file grpcpp/impl/codegen/sync_stream.h.

◆ Write()

template<class W >
bool grpc::ClientWriter< W >::Write ( const W msg,
grpc::WriteOptions  options 
)
inlineoverride

Definition at line 325 of file grpcpp/impl/codegen/sync_stream.h.

◆ WritesDone()

template<class W >
bool grpc::ClientWriter< W >::WritesDone ( )
inlineoverride

Definition at line 348 of file grpcpp/impl/codegen/sync_stream.h.

Friends And Related Function Documentation

◆ internal::ClientWriterFactory< W >

template<class W >
friend class internal::ClientWriterFactory< W >
friend

Definition at line 373 of file grpcpp/impl/codegen/sync_stream.h.

Member Data Documentation

◆ call_

template<class W >
grpc::internal::Call grpc::ClientWriter< W >::call_
private

Definition at line 407 of file grpcpp/impl/codegen/sync_stream.h.

◆ context_

template<class W >
grpc::ClientContext* grpc::ClientWriter< W >::context_
private

Definition at line 401 of file grpcpp/impl/codegen/sync_stream.h.

◆ cq_

template<class W >
grpc::CompletionQueue grpc::ClientWriter< W >::cq_
private

Definition at line 406 of file grpcpp/impl/codegen/sync_stream.h.

◆ finish_ops_

Definition at line 405 of file grpcpp/impl/codegen/sync_stream.h.


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


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:30