WriteOptions::clear_write_through method (#26774)

* Add WriteOptions::clear_write_through method

* Rearrange WriteOptions methods in a logical manner
pull/28763/head
Nikolai Semenov 3 years ago committed by GitHub
parent 60ee4454fb
commit 7b8fb43b33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      include/grpcpp/impl/codegen/call_op_set.h

@ -167,6 +167,12 @@ class WriteOptions {
return *this;
}
/// Get value for the flag indicating that this is the last message, and
/// should be coalesced with trailing metadata.
///
/// \sa GRPC_WRITE_LAST_MESSAGE
bool is_last_message() const { return last_message_; }
/// Guarantee that all bytes have been written to the socket before completing
/// this write (usually writes are completed when they pass flow control).
inline WriteOptions& set_write_through() {
@ -174,13 +180,12 @@ class WriteOptions {
return *this;
}
inline bool is_write_through() const { return GetBit(GRPC_WRITE_THROUGH); }
inline WriteOptions& clear_write_through() {
ClearBit(GRPC_WRITE_THROUGH);
return *this;
}
/// Get value for the flag indicating that this is the last message, and
/// should be coalesced with trailing metadata.
///
/// \sa GRPC_WRITE_LAST_MESSAGE
bool is_last_message() const { return last_message_; }
inline bool is_write_through() const { return GetBit(GRPC_WRITE_THROUGH); }
private:
void SetBit(const uint32_t mask) { flags_ |= mask; }

Loading…
Cancel
Save