GRPC C++  1.30.0
Public Member Functions | Friends
grpc_impl::ClientWriter< W > Class Template Reference

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

#include <channel_interface.h>

Public Member Functions

void WaitForInitialMetadata ()
 See the ClientStreamingInterface.WaitForInitialMetadata method for semantics. More...
 
bool Write (const W &msg, ::grpc::WriteOptions options) override
 Block to write msg to the stream with WriteOptions options. More...
 
bool WritesDone () override
 Half close writing from the client. More...
 
::grpc::Status Finish () override
 See the ClientStreamingInterface.Finish method for semantics. More...
 
- Public Member Functions inherited from grpc_impl::internal::ClientStreamingInterface
virtual ~ClientStreamingInterface ()
 
- Public Member Functions inherited from grpc_impl::internal::WriterInterface< W >
virtual ~WriterInterface ()
 
bool Write (const W &msg)
 Block to write msg to the stream with default write options. More...
 
void WriteLast (const W &msg, ::grpc::WriteOptions options)
 Write msg and coalesce it with the writing of trailing metadata, using WriteOptions options. More...
 

Friends

class internal::ClientWriterFactory< W >
 

Detailed Description

template<class W>
class grpc_impl::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.

Member Function Documentation

◆ Finish()

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

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.

Implements grpc_impl::internal::ClientStreamingInterface.

◆ WaitForInitialMetadata()

template<class W >
void grpc_impl::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.

◆ Write()

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

Block to write msg to the stream with WriteOptions options.

This is thread-safe with respect to ReaderInterface::Read

Parameters
msgThe message to be written to the stream.
optionsThe WriteOptions affecting the write operation.
Returns
true on success, false when the stream has been closed.

Implements grpc_impl::internal::WriterInterface< W >.

◆ WritesDone()

template<class W >
bool grpc_impl::ClientWriter< W >::WritesDone ( )
inlineoverridevirtual

Half close writing from the client.

(signal that the stream of messages coming from the client is complete). Blocks until currently-pending writes are completed. Thread safe with respect to ReaderInterface::Read operations only

Returns
Whether the writes were successful.

Implements grpc_impl::ClientWriterInterface< W >.

Friends And Related Function Documentation

◆ internal::ClientWriterFactory< W >

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

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