diff options
author | Craig Tiller <ctiller@google.com> | 2016-02-22 22:05:32 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-02-22 22:05:32 -0800 |
commit | c8d34d50a2daaa7014d800273ba3d8d5ae021825 (patch) | |
tree | c7a17389cff6146811ca5c974e9654fdbe5c0150 /include | |
parent | 30e9de8099ead2ca6e6d2dcd14df6d3c808bed18 (diff) | |
parent | eb62c943389d4b34e8a246a8fe63783aed885a01 (diff) |
Merge pull request #5287 from yang-g/global_callback_magic
Add a way to override channel arguments for server creation
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc++/server.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 2a71073a7e..c177805236 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -79,6 +79,8 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibrary { class GlobalCallbacks { public: virtual ~GlobalCallbacks() {} + /// Called before server is created. + virtual void UpdateArguments(ChannelArguments* args) {} /// Called before application callback for each synchronous server request virtual void PreSynchronousRequest(ServerContext* context) = 0; /// Called after application callback for each synchronous server request @@ -108,7 +110,7 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibrary { /// \param max_message_size Maximum message length that the channel can /// receive. Server(ThreadPoolInterface* thread_pool, bool thread_pool_owned, - int max_message_size, const ChannelArguments& args); + int max_message_size, ChannelArguments* args); /// Register a service. This call does not take ownership of the service. /// The service must exist for the lifetime of the Server instance. @@ -177,7 +179,7 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibrary { bool has_generic_service_; // Pointer to the c grpc server. - grpc_server* const server_; + grpc_server* server_; ThreadPoolInterface* thread_pool_; // Whether the thread pool is created and owned by the server. |