aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/impl
diff options
context:
space:
mode:
authorGravatar Yang Gao <yangg@google.com>2015-04-30 16:07:06 -0700
committerGravatar Yang Gao <yangg@google.com>2015-04-30 16:07:06 -0700
commit3921c56bee2adff62cb0f9519114d2aa22a67410 (patch)
tree7fdd42a532ca2040b15441d92bcd0b66eccf0397 /include/grpc++/impl
parent6d42a73bb984e19eb1bf84e2a952eec861cea464 (diff)
Expose max message size at the server side
Diffstat (limited to 'include/grpc++/impl')
-rw-r--r--include/grpc++/impl/call.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/grpc++/impl/call.h b/include/grpc++/impl/call.h
index b14c41dfa6..d76ef61dd2 100644
--- a/include/grpc++/impl/call.h
+++ b/include/grpc++/impl/call.h
@@ -80,6 +80,10 @@ class CallOpBuffer : public CompletionQueueTag {
// Called by completion queue just prior to returning from Next() or Pluck()
bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE;
+ void set_max_message_size(int max_message_size) {
+ max_message_size_ = max_message_size;
+ }
+
bool got_message;
private:
@@ -99,6 +103,7 @@ class CallOpBuffer : public CompletionQueueTag {
grpc::protobuf::Message* recv_message_;
ByteBuffer* recv_message_buffer_;
grpc_byte_buffer* recv_buf_;
+ int max_message_size_;
// Client send close
bool client_send_close_;
// Client recv status
@@ -130,16 +135,21 @@ class Call GRPC_FINAL {
public:
/* call is owned by the caller */
Call(grpc_call* call, CallHook* call_hook_, CompletionQueue* cq);
+ Call(grpc_call* call, CallHook* call_hook_, CompletionQueue* cq,
+ int max_message_size);
void PerformOps(CallOpBuffer* buffer);
grpc_call* call() { return call_; }
CompletionQueue* cq() { return cq_; }
+ int max_message_size() { return max_message_size_; }
+
private:
CallHook* call_hook_;
CompletionQueue* cq_;
grpc_call* call_;
+ int max_message_size_;
};
} // namespace grpc