Expose max message size at the server side
diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h
index 9a9932e..7155c7f 100644
--- a/include/grpc++/server_builder.h
+++ b/include/grpc++/server_builder.h
@@ -68,6 +68,11 @@
// Register a generic service.
void RegisterAsyncGenericService(AsyncGenericService* service);
+ // Set max message size in bytes.
+ void SetMaxMessageSize(int max_message_size) {
+ max_message_size_ = max_message_size;
+ }
+
// Add a listening port. Can be called multiple times.
void AddListeningPort(const grpc::string& addr,
std::shared_ptr<ServerCredentials> creds,
@@ -87,6 +92,7 @@
int* selected_port;
};
+ int max_message_size_;
std::vector<RpcService*> services_;
std::vector<AsynchronousService*> async_services_;
std::vector<Port> ports_;