diff options
author | Craig Tiller <ctiller@google.com> | 2017-09-01 10:20:13 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-09-01 10:20:13 -0700 |
commit | 9bebf8b22a8e058a290f7c7e4b7278c193d17a81 (patch) | |
tree | 362bd80960fecdb79083e704897ef09e707c1b86 /include/grpc++ | |
parent | 6ba448fb551fa06f7a59dd34131bda6691a02a92 (diff) |
C++ API for write-through
Diffstat (limited to 'include/grpc++')
-rw-r--r-- | include/grpc++/impl/codegen/call.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index 8e70225f86..74ed5cbfb9 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -169,6 +169,15 @@ class WriteOptions { return *this; } + /// Guarantee that all bytes have been written to the wire before completing + /// this write (usually writes are completed when they pass flow control) + inline WriteOptions& set_write_through() { + SetBit(GRPC_WRITE_THROUGH); + return *this; + } + + inline bool is_write_through() const { return GetBit(GRPC_WRITE_THROUGH); } + /// Get value for the flag indicating that this is the last message, and /// should be coalesced with trailing metadata. /// |