template <class Request, class Response>

class ServerBidiReactor

Defined at line 277 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h

is the interface for a bidirectional streaming RPC.

Public Methods

void ServerBidiReactor<Request, Response> ()

NOTE: Initializing stream_ as a constructor initializer rather than a

default initializer because gcc-4.x requires a copy constructor for

default initializing a templated member, which isn't ok for atomic.

TODO(vjpai): Switch to default constructor and default initializer when

gcc-4.x is no longer supported

Defined at line 284 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h

void ~ServerBidiReactor<Request, Response> ()

Defined at line 285 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h

void StartSendInitialMetadata ()

Send any initial metadata stored in the RPC context. If not invoked,

any initial metadata will be passed along with the first Write or the

Finish (if there are no writes).

Defined at line 290 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h

void StartRead (Request * req)

Initiate a read operation.

Parameters

req [out] Where to eventually store the read message. Valid when the library calls OnReadDone

Defined at line 308 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h

void StartWrite (const Response * resp)

Initiate a write operation.

Parameters

resp [in] The message to be written. The library does not take ownership but the caller must ensure that the message is not deleted or modified until OnWriteDone is called.

Defined at line 327 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h

void StartWrite (const Response * resp, grpc::WriteOptions options)

Initiate a write operation with specified options.

Parameters

resp [in] The message to be written. The library does not take ownership but the caller must ensure that the message is not deleted or modified until OnWriteDone is called.
options [in] The WriteOptions to use for writing this message

Defined at line 337 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h

void StartWriteAndFinish (const Response * resp, grpc::WriteOptions options, grpc::Status s)

Initiate a write operation with specified options and final RPC Status,

which also causes any trailing metadata for this RPC to be sent out.

StartWriteAndFinish is like merging StartWriteLast and Finish into a

single step. A key difference, though, is that this operation doesn't have

an OnWriteDone reaction - it is considered complete only when OnDone is

available. An RPC can either have StartWriteAndFinish or Finish, but not

both.

Parameters

resp [in] The message to be written. The library does not take ownership but the caller must ensure that the message is not deleted or modified until OnDone is called.
options [in] The WriteOptions to use for writing this message
s [in] The status outcome of this RPC

Defined at line 366 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h

void StartWriteLast (const Response * resp, grpc::WriteOptions options)

Inform system of a planned write operation with specified options, but

allow the library to schedule the actual write coalesced with the writing

of trailing metadata (which takes place on a Finish call).

Parameters

resp [in] The message to be written. The library does not take ownership but the caller must ensure that the message is not deleted or modified until OnWriteDone is called.
options [in] The WriteOptions to use for writing this message

Defined at line 392 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h

void Finish (grpc::Status s)

Indicate that the stream is to be finished and the trailing metadata and

RPC status are to be sent. Every RPC MUST be finished using either Finish

or StartWriteAndFinish (but not both), even if the RPC is already

cancelled.

Parameters

s [in] The status outcome of this RPC

Defined at line 402 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h

void OnDone ()

Notifies the application that all operations associated with this RPC

have completed. This is an override (from the internal base class) but

still abstract, so derived classes MUST override it to be instantiated.

void OnSendInitialMetadataDone (bool )

Notifies the application that an explicit StartSendInitialMetadata

operation completed. Not used when the sending of initial metadata

piggybacks onto the first write.

Parameters

ok [in] Was it successful? If false, no further write-side operation will succeed.

Defined at line 423 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h

void OnReadDone (bool )

Notifies the application that a StartRead operation completed.

Parameters

ok [in] Was it successful? If false, no further read-side operation will succeed.

Defined at line 429 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h

void OnWriteDone (bool )

Notifies the application that a StartWrite (or StartWriteLast) operation

completed.

Parameters

ok [in] Was it successful? If false, no further write-side operation will succeed.

Defined at line 436 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h

void OnCancel ()

Notifies the application that this RPC has been cancelled. This is an

override (from the internal base class) but not final, so derived classes

should override it if they want to take action.

Defined at line 446 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/server_callback.h