From 21035da1c9c20b5204ad4e9f2339490b3a3b6c0f Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 16 May 2017 11:42:04 -0700 Subject: Add api to server builder plugin to modify the builder --- include/grpc++/impl/server_builder_plugin.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/grpc++/impl') diff --git a/include/grpc++/impl/server_builder_plugin.h b/include/grpc++/impl/server_builder_plugin.h index 61632e32fa..00d806ddb1 100644 --- a/include/grpc++/impl/server_builder_plugin.h +++ b/include/grpc++/impl/server_builder_plugin.h @@ -40,6 +40,7 @@ namespace grpc { +class ServerBuilder; class ServerInitializer; class ChannelArguments; @@ -48,6 +49,9 @@ class ServerBuilderPlugin { virtual ~ServerBuilderPlugin() {} virtual grpc::string name() = 0; + /// UpdateServerBuilder will be called at the beginning of BuildAndStart. + virtual void UpdateServerBuilder(ServerBuilder* builder) {} + // InitServer will be called in ServerBuilder::BuildAndStart(), after the // Server instance is created. virtual void InitServer(ServerInitializer* si) = 0; -- cgit v1.2.3 From a64ea5496d122aca53b9226108a119ab3b06408d Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Thu, 4 May 2017 11:02:17 -0700 Subject: Corrected spelling --- include/grpc++/impl/codegen/client_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/grpc++/impl') diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index b1b9be0fe2..b03715e70c 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -307,7 +307,7 @@ class ClientContext { /// Flag whether the initial metadata should be \a corked /// - /// If \a corked is true, then the initial metadata will be colasced with the + /// If \a corked is true, then the initial metadata will be coalesced with the /// write of first message in the stream. /// /// \param corked The flag indicating whether the initial metadata is to be -- cgit v1.2.3 From 127fdaeace0bd1715ae4e6b8ece6bd838d766819 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 19 May 2017 13:16:13 -0700 Subject: More Doxygen comment improvements. --- include/grpc++/create_channel.h | 14 ++++++++------ include/grpc++/impl/codegen/client_context.h | 5 +++-- include/grpc++/security/auth_metadata_processor.h | 3 +++ include/grpc++/server.h | 2 +- include/grpc++/server_builder.h | 8 +++++++- 5 files changed, 22 insertions(+), 10 deletions(-) (limited to 'include/grpc++/impl') diff --git a/include/grpc++/create_channel.h b/include/grpc++/create_channel.h index 0537695ed2..11f9bc037c 100644 --- a/include/grpc++/create_channel.h +++ b/include/grpc++/create_channel.h @@ -43,23 +43,25 @@ namespace grpc { -/// Create a new \a Channel pointing to \a target +/// Create a new \a Channel pointing to \a target. /// /// \param target The URI of the endpoint to connect to. -/// \param creds Credentials to use for the created channel. If it does not hold -/// an object or is invalid, a lame channel is returned. +/// \param creds Credentials to use for the created channel. If it does not +/// hold an object or is invalid, a lame channel (one on which all operations +/// fail) is returned. std::shared_ptr CreateChannel( const grpc::string& target, const std::shared_ptr& creds); -/// Create a new \em custom \a Channel pointing to \a target +/// Create a new \em custom \a Channel pointing to \a target. /// /// \warning For advanced use and testing ONLY. Override default channel /// arguments only if necessary. /// /// \param target The URI of the endpoint to connect to. -/// \param creds Credentials to use for the created channel. If it does not hold -/// an object or is invalid, a lame channel is returned. +/// \param creds Credentials to use for the created channel. If it does not +/// hold an object or is invalid, a lame channel (one on which all operations +/// fail) is returned. /// \param args Options for channel creation. std::shared_ptr CreateCustomChannel( const grpc::string& target, diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index b1b9be0fe2..720df8a1dc 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -331,8 +331,9 @@ class ClientContext { return census_context_; } - /// Send a best-effort out-of-band cancel. The call could be in any stage. - /// e.g. if it is already finished, it may still return success. + /// Send a best-effort out-of-band cancel on the call associated with + /// this client context. The call could be in any stage; e.g., if it is + /// already finished, it may still return success. /// /// There is no guarantee the call will be cancelled. void TryCancel(); diff --git a/include/grpc++/security/auth_metadata_processor.h b/include/grpc++/security/auth_metadata_processor.h index 3536923146..9d3d41a7a0 100644 --- a/include/grpc++/security/auth_metadata_processor.h +++ b/include/grpc++/security/auth_metadata_processor.h @@ -42,6 +42,9 @@ namespace grpc { +/// Interface allowing custom server-side authorization based on credentials +/// encoded in metadata. Objects of this type can be passed to +/// \a ServerCredentials::SetAuthMetadataProcessor(). class AuthMetadataProcessor { public: typedef std::multimap InputMetadata; diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 2f7018e95b..976879c9c5 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -67,7 +67,7 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { public: ~Server(); - /// Block waiting for all work to complete. + /// Block until the server shuts down. /// /// \warning The server must be either shutting down or some other thread must /// call \a Shutdown for this function to ever return. diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 2185b283ac..84ec2eb6ed 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -71,7 +71,13 @@ class ServerBuilder { ServerBuilder(); ~ServerBuilder(); - enum SyncServerOption { NUM_CQS, MIN_POLLERS, MAX_POLLERS, CQ_TIMEOUT_MSEC }; + /// Options for synchronous servers. + enum SyncServerOption { + NUM_CQS, // Number of completion queues. + MIN_POLLERS, // Minimum number of polling threads. + MAX_POLLERS, // Maximum number of polling threads. + CQ_TIMEOUT_MSEC // Completion queue timeout in milliseconds. + }; /// Register a service. This call does not take ownership of the service. /// The service must exist for the lifetime of the \a Server instance returned -- cgit v1.2.3