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(-) 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 7ee630a3d7a95c3718f4e6d623c61ffc506762d1 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 10:11:52 -0700 Subject: Clarified grpc::Server documentation comment Make it clear that the creation of the Server instance is not supposed to happen by using the Server class directly and they are instructed to use ServerBuilder. --- include/grpc++/server.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 2f7018e95b..0fbf841483 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -60,9 +60,10 @@ class HealthCheckServiceInterface; class ServerContext; class ServerInitializer; -/// Models a gRPC server. +/// Represents a gRPC server. /// -/// Servers are configured and started via \a grpc::ServerBuilder. +/// Use a \a grpc::ServerBuilder to create, configure, and start +/// \a Server instances. class Server final : public ServerInterface, private GrpcLibraryCodegen { public: ~Server(); -- cgit v1.2.3 From 24b6d392125561b73e472dfe954613b6249faf97 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 10:18:38 -0700 Subject: Clarified GlobalCallbacks documentation comment Make it clear that "global" and "per application" means shared among all grpc::Server instances. --- include/grpc++/server.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 0fbf841483..5da606cf66 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -74,10 +74,12 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { /// call \a Shutdown for this function to ever return. void Wait() override; - /// Global Callbacks - /// - /// Can be set exactly once per application to install hooks whenever - /// a server event occurs + /// Global callbacks are a set of hooks that are called when server + /// events occur. \a SetGlobalCallbacks method is used to register + /// the hooks with gRPC. Note that + /// the \a GlobalCallbacks instance will be shared among all + /// \a Server instances in an application and can be set exactly + /// once per application. class GlobalCallbacks { public: virtual ~GlobalCallbacks() {} @@ -93,9 +95,11 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { virtual void AddPort(Server* server, const grpc::string& addr, ServerCredentials* creds, int port) {} }; - /// Set the global callback object. Can only be called once. Does not take - /// ownership of callbacks, and expects the pointed to object to be alive - /// until all server objects in the process have been destroyed. + /// Set the global callback object. Can only be called once per application. + /// Does not take ownership of callbacks, and expects the pointed to object + /// to be alive until all server objects in the process have been destroyed. + /// The same \a GlobalCallbacks object will be used throughout the + /// application and is shared among all \a Server objects. static void SetGlobalCallbacks(GlobalCallbacks* callbacks); // Returns a \em raw pointer to the underlying grpc_server instance. -- cgit v1.2.3 From bcd6ca5033c501a92c6d1f2037b41b2c35579a93 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 10:35:35 -0700 Subject: Link to grpc_server symbol --- include/grpc++/server.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 5da606cf66..1d9f5ac041 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -102,7 +102,7 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { /// application and is shared among all \a Server objects. static void SetGlobalCallbacks(GlobalCallbacks* callbacks); - // Returns a \em raw pointer to the underlying grpc_server instance. + // Returns a \em raw pointer to the underlying \a grpc_server instance. grpc_server* c_server(); /// Returns the health check service. -- cgit v1.2.3 From 3cd6cf4983a5b9f5f713c76041535a0bfce4b99f Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 10:38:49 -0700 Subject: Fix documentation for Server::AddListeningPort Clarify that Port is actually an endpoint. Fix typos Clarify that it should be used before starting the server. --- include/grpc++/server.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 1d9f5ac041..ac89b8ca4f 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -163,15 +163,17 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { /// service. The service must exist for the lifetime of the Server instance. void RegisterAsyncGenericService(AsyncGenericService* service) override; - /// Tries to bind \a server to the given \a addr. + /// Try binding the server to the given \a addr endpoint + /// (port, and optionally including IP address to bind to). /// - /// It can be invoked multiple times. + /// It can be invoked multiple times. Should be used before + /// starting the server. /// /// \param addr The address to try to bind to the server (eg, localhost:1234, /// 192.168.1.1:31416, [::1]:27182, etc.). /// \params creds The credentials associated with the server. /// - /// \return bound port number on sucess, 0 on failure. + /// \return bound port number on success, 0 on failure. /// /// \warning It's an error to call this method on an already started server. int AddListeningPort(const grpc::string& addr, -- cgit v1.2.3 From 32abe8a6c2e959445faff6a85c7eb003c3d22dec Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 10:43:20 -0700 Subject: Minor docfixes for AddInsecureChannelFromFd --- include/grpc++/server_posix.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/grpc++/server_posix.h b/include/grpc++/server_posix.h index e6066d4eaa..a8fe8cb3d1 100644 --- a/include/grpc++/server_posix.h +++ b/include/grpc++/server_posix.h @@ -43,9 +43,10 @@ namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD -/// Adds new client to a \a Server communicating over given file descriptor +/// Add a new client to a \a Server communicating over the given +/// file descriptor. /// -/// \param server The server to add a client to. +/// \param server The server to add the client to. /// \param fd The file descriptor representing a socket. void AddInsecureChannelFromFd(Server* server, int fd); -- cgit v1.2.3 From 3475cf72c8d65dea7e2a4694b1f059d5a39824d2 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 11:04:42 -0700 Subject: Corrected the documentation for ServerBuilder::AddListenPort --- include/grpc++/server_builder.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 2185b283ac..c5b5cb4a48 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -139,15 +139,17 @@ class ServerBuilder { return SetOption(MakeChannelArgumentOption(arg, value)); } - /// Tries to bind \a server to the given \a addr. + /// Enlists an endpoint \a addr (port with an optional IP address) to + /// bind the \a grpc::Server object to be created to. /// /// It can be invoked multiple times. /// /// \param addr The address to try to bind to the server (eg, localhost:1234, /// 192.168.1.1:31416, [::1]:27182, etc.). /// \params creds The credentials associated with the server. - /// \param selected_port[out] Upon success, updated to contain the port - /// number. \a nullptr otherwise. + /// \param selected_port[out] If not `nullptr`, gets populated with the port + /// number bound to the \a grpc::Server for the corresponding endpoint after + /// it is successfully bound, 0 otherwise. /// // TODO(dgq): the "port" part seems to be a misnomer. ServerBuilder& AddListeningPort(const grpc::string& addr, -- cgit v1.2.3 From e456ce080654c41fd2713c3db8a46c806b388619 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 11:05:23 -0700 Subject: minor: Link to GRPC_STATUS_IMPLEMENTED --- include/grpc++/server_builder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index c5b5cb4a48..0eabafb4ff 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -110,7 +110,7 @@ class ServerBuilder { /// enabled by default. /// /// Incoming calls compressed with an unsupported algorithm will fail with - /// GRPC_STATUS_UNIMPLEMENTED. + /// \a GRPC_STATUS_UNIMPLEMENTED. ServerBuilder& SetCompressionAlgorithmSupportStatus( grpc_compression_algorithm algorithm, bool enabled); -- cgit v1.2.3 From 493f444c73bd5cd3756779121ed76845bdf215c8 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:15:49 -0700 Subject: minor: prefer more formal 'it is' to it's --- include/grpc++/server.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/server.h b/include/grpc++/server.h index ac89b8ca4f..fa3b7def85 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -175,7 +175,7 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { /// /// \return bound port number on success, 0 on failure. /// - /// \warning It's an error to call this method on an already started server. + /// \warning It is an error to call this method on an already started server. int AddListeningPort(const grpc::string& addr, ServerCredentials* creds) override; -- cgit v1.2.3 From 4fea66062dfd441a53e43b45c83dc0570ca8f527 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:17:44 -0700 Subject: minor: GRPC->gRPC --- include/grpc++/server_builder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 0eabafb4ff..ee64a2a0c9 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -171,7 +171,7 @@ class ServerBuilder { /// server_->Shutdown(); /// cq_->Shutdown(); // Always *after* the associated server's Shutdown()! /// - /// \param is_frequently_polled This is an optional parameter to inform GRPC + /// \param is_frequently_polled This is an optional parameter to inform gRPC /// library about whether this completion queue would be frequently polled /// (i.e by calling Next() or AsyncNext()). The default value is 'true' and is /// the recommended setting. Setting this to 'false' (i.e not polling the -- cgit v1.2.3 From c78e59663dcfbae4503160400e0994472ff445d0 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:18:16 -0700 Subject: minor: i.e->i.e. --- include/grpc++/server_builder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index ee64a2a0c9..f28ffcd354 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -174,7 +174,7 @@ class ServerBuilder { /// \param is_frequently_polled This is an optional parameter to inform gRPC /// library about whether this completion queue would be frequently polled /// (i.e by calling Next() or AsyncNext()). The default value is 'true' and is - /// the recommended setting. Setting this to 'false' (i.e not polling the + /// the recommended setting. Setting this to 'false' (i.e. not polling the /// completion queue frequently) will have a significantly negative /// performance impact and hence should not be used in production use cases. std::unique_ptr AddCompletionQueue( -- cgit v1.2.3 From dcc36108608b35d08cf50812ce5cc61889126baf Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:19:27 -0700 Subject: link referenced code elements --- include/grpc++/resource_quota.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/grpc++/resource_quota.h b/include/grpc++/resource_quota.h index 1199ae9381..9abfef821b 100644 --- a/include/grpc++/resource_quota.h +++ b/include/grpc++/resource_quota.h @@ -42,9 +42,10 @@ struct grpc_resource_quota; namespace grpc { /// ResourceQuota represents a bound on memory usage by the gRPC library. -/// A ResourceQuota can be attached to a server (via ServerBuilder), or a client -/// channel (via ChannelArguments). gRPC will attempt to keep memory used by -/// all attached entities below the ResourceQuota bound. +/// A ResourceQuota can be attached to a server (via \a ServerBuilder), +/// or a client channel (via \a ChannelArguments). +/// gRPC will attempt to keep memory used by all attached entities +/// below the ResourceQuota bound. class ResourceQuota final : private GrpcLibraryCodegen { public: /// \param name - a unique name for this ResourceQuota. -- cgit v1.2.3 From ab1277c43389c20d0ed51d18c71f683cd060c7ed Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:21:26 -0700 Subject: Add documentation comment for Version() --- include/grpc++/grpc++.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/grpc++/grpc++.h b/include/grpc++/grpc++.h index 978b172346..d6c3e2e768 100644 --- a/include/grpc++/grpc++.h +++ b/include/grpc++/grpc++.h @@ -76,6 +76,7 @@ // IWYU pragma: end_exports namespace grpc { +/// Return gRPC library version. grpc::string Version(); } // namespace grpc -- cgit v1.2.3 From b97bd4a8e72c4a1b06ba58ab26a729097d9cec8b Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:24:40 -0700 Subject: minor: add trailing period --- include/grpc++/create_channel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/grpc++/create_channel.h b/include/grpc++/create_channel.h index 0537695ed2..669711531f 100644 --- a/include/grpc++/create_channel.h +++ b/include/grpc++/create_channel.h @@ -43,7 +43,7 @@ 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 @@ -52,7 +52,7 @@ 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. -- cgit v1.2.3 From 6f07e3aa42f8f3d61c24d6f7ee314f70c3994e87 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:25:39 -0700 Subject: minor --- include/grpc++/create_channel_posix.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/grpc++/create_channel_posix.h b/include/grpc++/create_channel_posix.h index 2af12e6c36..cb323a2f24 100644 --- a/include/grpc++/create_channel_posix.h +++ b/include/grpc++/create_channel_posix.h @@ -44,7 +44,7 @@ namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD -/// Create a new \a Channel communicating over given file descriptor +/// Create a new \a Channel communicating over the given file descriptor. /// /// \param target The name of the target. /// \param fd The file descriptor representing a socket. @@ -52,7 +52,7 @@ std::shared_ptr CreateInsecureChannelFromFd(const grpc::string& target, int fd); /// Create a new \a Channel communicating over given file descriptor with custom -/// channel arguments +/// channel arguments. /// /// \param target The name of the target. /// \param fd The file descriptor representing a socket. -- cgit v1.2.3 From f0e87f73649f605e5de76c507780a4e441813eb6 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:42:59 -0700 Subject: doxygenize comment --- .../grpc++/ext/health_check_service_server_builder_option.h | 2 +- include/grpc++/ext/proto_server_reflection_plugin.h | 4 ++-- include/grpc++/security/server_credentials.h | 11 ++++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/grpc++/ext/health_check_service_server_builder_option.h b/include/grpc++/ext/health_check_service_server_builder_option.h index a27841af01..9da8e91cd5 100644 --- a/include/grpc++/ext/health_check_service_server_builder_option.h +++ b/include/grpc++/ext/health_check_service_server_builder_option.h @@ -44,7 +44,7 @@ namespace grpc { class HealthCheckServiceServerBuilderOption : public ServerBuilderOption { public: - /// The ownership of hc will be taken and transferred to the grpc server. + /// The ownership of \a hc will be taken and transferred to the grpc server. /// To explicitly disable default service, pass in a nullptr. explicit HealthCheckServiceServerBuilderOption( std::unique_ptr hc); diff --git a/include/grpc++/ext/proto_server_reflection_plugin.h b/include/grpc++/ext/proto_server_reflection_plugin.h index 6497bba905..f4a0eec986 100644 --- a/include/grpc++/ext/proto_server_reflection_plugin.h +++ b/include/grpc++/ext/proto_server_reflection_plugin.h @@ -59,8 +59,8 @@ class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { std::shared_ptr reflection_service_; }; -/// Add proto reflection plugin to ServerBuilder. This function should be called -/// at the static initialization time. +/// Add proto reflection plugin to \a ServerBuilder. +/// This function should be called at the static initialization time. void InitProtoReflectionServerBuilderPlugin(); } // namespace reflection diff --git a/include/grpc++/security/server_credentials.h b/include/grpc++/security/server_credentials.h index 4676b04c5d..d7720e41e5 100644 --- a/include/grpc++/security/server_credentials.h +++ b/include/grpc++/security/server_credentials.h @@ -70,7 +70,7 @@ class ServerCredentials { /// Options to create ServerCredentials with SSL struct SslServerCredentialsOptions { - /// Deprecated + /// \warning Deprecated SslServerCredentialsOptions() : force_client_auth(false), client_certificate_request(GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE) {} @@ -84,12 +84,13 @@ struct SslServerCredentialsOptions { }; grpc::string pem_root_certs; std::vector pem_key_cert_pairs; - /// Deprecated + /// \warning Deprecated bool force_client_auth; - /// If both force_client_auth and client_certificate_request fields are set, - /// force_client_auth takes effect i.e - /// REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY will be enforced. + /// If both \a force_client_auth and \a client_certificate_request + /// fields are set, \a force_client_auth takes effect, i.e. + /// \a REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY + /// will be enforced. grpc_ssl_client_certificate_request_type client_certificate_request; }; -- cgit v1.2.3 From a9d5637a37e3ebc557a6a937a661f64e07e205ca Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:00:24 -0700 Subject: minor: doxygenize health_care_service_interface.h comments --- include/grpc++/health_check_service_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/health_check_service_interface.h b/include/grpc++/health_check_service_interface.h index c1b43199a6..bdc4ed76ef 100644 --- a/include/grpc++/health_check_service_interface.h +++ b/include/grpc++/health_check_service_interface.h @@ -47,7 +47,7 @@ class HealthCheckServiceInterface { public: virtual ~HealthCheckServiceInterface() {} - /// Set or change the serving status of the given service_name. + /// Set or change the serving status of the given \a service_name. virtual void SetServingStatus(const grpc::string& service_name, bool serving) = 0; /// Apply to all registered service names. -- cgit v1.2.3 From 3a509ecc5dddf5116859abaabe8e052affe11b77 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:01:19 -0700 Subject: minor: Link code entities in comments --- include/grpc++/resource_quota.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/grpc++/resource_quota.h b/include/grpc++/resource_quota.h index 9abfef821b..fab2b4c6e4 100644 --- a/include/grpc++/resource_quota.h +++ b/include/grpc++/resource_quota.h @@ -53,10 +53,10 @@ class ResourceQuota final : private GrpcLibraryCodegen { ResourceQuota(); ~ResourceQuota(); - /// Resize this ResourceQuota to a new size. If new_size is smaller than the - /// current size of the pool, memory usage will be monotonically decreased - /// until it falls under new_size. No time bound is given for this to occur - /// however. + /// Resize this \a ResourceQuota to a new size. If \a new_size is smaller + /// than the current size of the pool, memory usage will be monotonically + /// decreased until it falls under \a new_size. + /// No time bound is given for this to occur however. ResourceQuota& Resize(size_t new_size); grpc_resource_quota* c_resource_quota() const { return impl_; } -- cgit v1.2.3 From 31e9c14e8370aaf25129d7be63ac2ef3285b192b Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:02:06 -0700 Subject: doxygenize auth_metadata_processor.h comments --- include/grpc++/security/auth_metadata_processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/security/auth_metadata_processor.h b/include/grpc++/security/auth_metadata_processor.h index 3536923146..18e8a47515 100644 --- a/include/grpc++/security/auth_metadata_processor.h +++ b/include/grpc++/security/auth_metadata_processor.h @@ -49,7 +49,7 @@ class AuthMetadataProcessor { virtual ~AuthMetadataProcessor() {} - /// If this method returns true, the Process function will be scheduled in + /// If this method returns true, the \a Process function will be scheduled in /// a different thread from the one processing the call. virtual bool IsBlocking() const { return true; } -- cgit v1.2.3 From 59cd2d7f661d3de0f7e6244f1fb9da2ee2e9a4a4 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:03:08 -0700 Subject: doxygenize include/grpc++/security/credentials.h comments --- include/grpc++/security/credentials.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/security/credentials.h b/include/grpc++/security/credentials.h index 8d9d181fde..46cc96eca3 100644 --- a/include/grpc++/security/credentials.h +++ b/include/grpc++/security/credentials.h @@ -151,7 +151,7 @@ std::shared_ptr GoogleComputeEngineCredentials(); /// json_key is the JSON key string containing the client's private key. /// token_lifetime_seconds is the lifetime in seconds of each Json Web Token /// (JWT) created with this credentials. It should not exceed -/// grpc_max_auth_token_lifetime or will be cropped to this value. +/// \a grpc_max_auth_token_lifetime or will be cropped to this value. std::shared_ptr ServiceAccountJWTAccessCredentials( const grpc::string& json_key, long token_lifetime_seconds); -- cgit v1.2.3 From 4601bc254b5b58c225ce3b16e0a9a4df172c7d05 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:03:39 -0700 Subject: tiny edit and linking entities --- include/grpc++/server.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/grpc++/server.h b/include/grpc++/server.h index fa3b7def85..85a7300820 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -201,13 +201,14 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { const int max_receive_message_size_; - /// The following completion queues are ONLY used in case of Sync API i.e if - /// the server has any services with sync methods. The server uses these - /// completion queues to poll for new RPCs + /// The following completion queues are ONLY used in case of Sync API + /// i.e. if the server has any services with sync methods. The server uses + /// these completion queues to poll for new RPCs std::shared_ptr>> sync_server_cqs_; - /// List of ThreadManager instances (one for each cq in the sync_server_cqs) + /// List of \a ThreadManager instances (one for each cq in + /// the \a sync_server_cqs) std::vector> sync_req_mgrs_; // Sever status -- cgit v1.2.3 From 27da5defc708852962893f3d982abd3e0e6f6cf0 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:04:46 -0700 Subject: Minor edits and doxygenize some comments --- include/grpc++/server_builder.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index f28ffcd354..8bedef5899 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -85,7 +85,7 @@ class ServerBuilder { /// 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 - /// by BuildAndStart(). + /// by \a BuildAndStart(). /// Only matches requests with :authority \a host ServerBuilder& RegisterService(const grpc::string& host, Service* service); @@ -173,10 +173,11 @@ class ServerBuilder { /// /// \param is_frequently_polled This is an optional parameter to inform gRPC /// library about whether this completion queue would be frequently polled - /// (i.e by calling Next() or AsyncNext()). The default value is 'true' and is - /// the recommended setting. Setting this to 'false' (i.e. not polling the - /// completion queue frequently) will have a significantly negative - /// performance impact and hence should not be used in production use cases. + /// (i.e. by calling \a Next() or \a AsyncNext()). The default value is + /// 'true' and is the recommended setting. Setting this to 'false' (i.e. + /// not polling the completion queue frequently) will have a significantly + /// negative performance impact and hence should not be used in production + /// use cases. std::unique_ptr AddCompletionQueue( bool is_frequently_polled = true); @@ -208,18 +209,18 @@ class ServerBuilder { max_pollers(2), cq_timeout_msec(10000) {} - // Number of server completion queues to create to listen to incoming RPCs. + /// Number of server completion queues to create to listen to incoming RPCs. int num_cqs; - // Minimum number of threads per completion queue that should be listening - // to incoming RPCs. + /// Minimum number of threads per completion queue that should be listening + /// to incoming RPCs. int min_pollers; - // Maximum number of threads per completion queue that can be listening to - // incoming RPCs. + /// Maximum number of threads per completion queue that can be listening to + /// incoming RPCs. int max_pollers; - // The timeout for server completion queue's AsyncNext call. + /// The timeout for server completion queue's AsyncNext call. int cq_timeout_msec; }; @@ -240,7 +241,7 @@ class ServerBuilder { SyncServerSettings sync_server_settings_; - // List of completion queues added via AddCompletionQueue() method + /// List of completion queues added via \a AddCompletionQueue method. std::vector cqs_; std::shared_ptr creds_; -- cgit v1.2.3 From 65942421b4419bf02077a4180671c30c38131012 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:05:12 -0700 Subject: minor edits in channel_arguments.h --- include/grpc++/support/channel_arguments.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h index 61307d6194..061ab55138 100644 --- a/include/grpc++/support/channel_arguments.h +++ b/include/grpc++/support/channel_arguments.h @@ -49,7 +49,7 @@ class ChannelArgumentsTest; class ResourceQuota; /// Options for channel creation. The user can use generic setters to pass -/// key value pairs down to c channel creation code. For grpc related options, +/// key value pairs down to C channel creation code. For gRPC related options, /// concrete setters are provided. class ChannelArguments { public: @@ -82,13 +82,13 @@ class ChannelArguments { /// Set the socket mutator for the channel. void SetSocketMutator(grpc_socket_mutator* mutator); - /// The given string will be sent at the front of the user agent string. + /// Set the string to prepend to the user agent. void SetUserAgentPrefix(const grpc::string& user_agent_prefix); - /// The given buffer pool will be attached to the constructed channel + /// Set the buffer pool to be attached to the constructed channel. void SetResourceQuota(const ResourceQuota& resource_quota); - /// Sets the max receive and send message sizes. + /// Set the max receive and send message sizes. void SetMaxReceiveMessageSize(int size); void SetMaxSendMessageSize(int size); @@ -115,8 +115,8 @@ class ChannelArguments { /// Set a textual argument \a value under \a key. void SetString(const grpc::string& key, const grpc::string& value); - /// Return (by value) a c grpc_channel_args structure which points to - /// arguments owned by this ChannelArguments instance + /// Return (by value) a C \a grpc_channel_args structure which points to + /// arguments owned by this \a ChannelArguments instance grpc_channel_args c_channel_args() const { grpc_channel_args out; out.num_args = args_.size(); -- cgit v1.2.3 From 6a6747a9066c96e60515ffc148c33a8c547462b2 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:05:32 -0700 Subject: Link comment code entities --- include/grpc++/support/error_details.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/grpc++/support/error_details.h b/include/grpc++/support/error_details.h index d4324d35cf..4f5176228c 100644 --- a/include/grpc++/support/error_details.h +++ b/include/grpc++/support/error_details.h @@ -44,16 +44,16 @@ class Status; namespace grpc { -/// Maps a grpc::Status to a google::rpc::Status. +/// Map a \a grpc::Status to a \a google::rpc::Status. /// The given \a to object will be cleared. /// On success, returns status with OK. -/// Returns status with INVALID_ARGUMENT, if failed to deserialize. -/// Returns status with FAILED_PRECONDITION, if \a to is nullptr. +/// Returns status with \a INVALID_ARGUMENT, if failed to deserialize. +/// Returns status with \a FAILED_PRECONDITION, if \a to is nullptr. Status ExtractErrorDetails(const Status& from, ::google::rpc::Status* to); -/// Maps google::rpc::Status to a grpc::Status. +/// Map \a google::rpc::Status to a \a grpc::Status. /// Returns OK on success. -/// Returns status with FAILED_PRECONDITION if \a to is nullptr. +/// Returns status with \a FAILED_PRECONDITION if \a to is nullptr. Status SetErrorDetails(const ::google::rpc::Status& from, Status* to); } // namespace grpc -- cgit v1.2.3 From d488bbac0255dfd16c19be28b8f99c7e6dab2d80 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:06:01 -0700 Subject: minor: doxygenize comment --- include/grpc++/support/slice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index 3ec0d1af80..e2bd211413 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -48,7 +48,7 @@ class Slice final { public: /// Construct an empty slice. Slice(); - // Destructor - drops one reference. + /// Destructor - drops one reference. ~Slice(); enum AddRef { ADD_REF }; -- cgit v1.2.3 From 37718a4fce1d643cff91d56d3344aef03103e45c Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:06:34 -0700 Subject: Doxygenize comments in server_context_test_spouse.h --- include/grpc++/test/server_context_test_spouse.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/grpc++/test/server_context_test_spouse.h b/include/grpc++/test/server_context_test_spouse.h index 5bd07e7aec..80edd5622b 100644 --- a/include/grpc++/test/server_context_test_spouse.h +++ b/include/grpc++/test/server_context_test_spouse.h @@ -47,7 +47,7 @@ class ServerContextTestSpouse { explicit ServerContextTestSpouse(ServerContext* ctx) : ctx_(ctx) {} /// Inject client metadata to the ServerContext for the test. The test spouse - /// must be alive when ServerContext::client_metadata is called. + /// must be alive when \a ServerContext::client_metadata is called. void AddClientMetadata(const grpc::string& key, const grpc::string& value) { client_metadata_storage_.insert( std::pair(key, value)); @@ -70,7 +70,7 @@ class ServerContextTestSpouse { } private: - ServerContext* ctx_; /// not owned + ServerContext* ctx_; // not owned std::multimap client_metadata_storage_; }; -- cgit v1.2.3