aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-04-24 13:33:06 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-04-24 13:33:06 -0700
commit6f2024f4eca994ba18f47502d1cebf5d4616256d (patch)
tree100a545063425d271834136a488576b5dc989442 /include/grpc
parentdecec093169c93a8e6d033ff9971b0999a2766a3 (diff)
parent731adcc0b4b06de05444bfbd65a3a1d9aaa3ecaf (diff)
Merge github.com:grpc/grpc into c++lame
Diffstat (limited to 'include/grpc')
-rw-r--r--include/grpc/grpc.h58
-rw-r--r--include/grpc/impl/codegen/grpc_types.h49
2 files changed, 49 insertions, 58 deletions
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index 5ded451540..1eeb075927 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -93,55 +93,6 @@ GRPCAPI const char *grpc_version_string(void);
/** Return a string specifying what the 'g' in gRPC stands for */
GRPCAPI const char *grpc_g_stands_for(void);
-/** Specifies the type of APIs to use to pop events from the completion queue */
-typedef enum {
- /** Events are popped out by calling grpc_completion_queue_next() API ONLY */
- GRPC_CQ_NEXT = 1,
-
- /** Events are popped out by calling grpc_completion_queue_pluck() API ONLY*/
- GRPC_CQ_PLUCK
-} grpc_cq_completion_type;
-
-/** Completion queues internally MAY maintain a set of file descriptors in a
- structure called 'pollset'. This enum specifies if a completion queue has an
- associated pollset and any restrictions on the type of file descriptors that
- can be present in the pollset.
-
- I/O progress can only be made when grpc_completion_queue_next() or
- grpc_completion_queue_pluck() are called on the completion queue (unless the
- grpc_cq_polling_type is GRPC_CQ_NON_POLLING) and hence it is very important
- to actively call these APIs */
-typedef enum {
- /** The completion queue will have an associated pollset and there is no
- restriction on the type of file descriptors the pollset may contain */
- GRPC_CQ_DEFAULT_POLLING,
-
- /** Similar to GRPC_CQ_DEFAULT_POLLING except that the completion queues will
- not contain any 'listening file descriptors' (i.e file descriptors used to
- listen to incoming channels) */
- GRPC_CQ_NON_LISTENING,
-
- /** The completion queue will not have an associated pollset. Note that
- grpc_completion_queue_next() or grpc_completion_queue_pluck() MUST still
- be called to pop events from the completion queue; it is not required to
- call them actively to make I/O progress */
- GRPC_CQ_NON_POLLING
-} grpc_cq_polling_type;
-
-#define GRPC_CQ_CURRENT_VERSION 1
-typedef struct grpc_completion_queue_attributes {
- /* The version number of this structure. More fields might be added to this
- structure in future. */
- int version; /* Set to GRPC_CQ_CURRENT_VERSION */
-
- grpc_cq_completion_type cq_completion_type;
-
- grpc_cq_polling_type cq_polling_type;
-} grpc_completion_queue_attributes;
-
-/** The completion queue factory structure is opaque to the callers of grpc */
-typedef struct grpc_completion_queue_factory grpc_completion_queue_factory;
-
/** Returns the completion queue factory based on the attributes. MAY return a
NULL if no factory can be found */
GRPCAPI const grpc_completion_queue_factory *
@@ -427,15 +378,6 @@ GRPCAPI void grpc_server_register_completion_queue(grpc_server *server,
grpc_completion_queue *cq,
void *reserved);
-/** Register a non-listening completion queue with the server. This API is
- similar to grpc_server_register_completion_queue except that the server will
- not use this completion_queue to listen to any incoming channels.
-
- Registering a non-listening completion queue will have negative performance
- impact and hence this API is not recommended for production use cases. */
-GRPCAPI void grpc_server_register_non_listening_completion_queue(
- grpc_server *server, grpc_completion_queue *q, void *reserved);
-
/** Add a HTTP2 over plaintext over tcp listener.
Returns bound port number on success, 0 on failure.
REQUIRES: server not started */
diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h
index 8c0786f463..b2c38b2c92 100644
--- a/include/grpc/impl/codegen/grpc_types.h
+++ b/include/grpc/impl/codegen/grpc_types.h
@@ -557,6 +557,55 @@ typedef struct {
typedef struct grpc_resource_quota grpc_resource_quota;
+/** Completion queues internally MAY maintain a set of file descriptors in a
+ structure called 'pollset'. This enum specifies if a completion queue has an
+ associated pollset and any restrictions on the type of file descriptors that
+ can be present in the pollset.
+
+ I/O progress can only be made when grpc_completion_queue_next() or
+ grpc_completion_queue_pluck() are called on the completion queue (unless the
+ grpc_cq_polling_type is GRPC_CQ_NON_POLLING) and hence it is very important
+ to actively call these APIs */
+typedef enum {
+ /** The completion queue will have an associated pollset and there is no
+ restriction on the type of file descriptors the pollset may contain */
+ GRPC_CQ_DEFAULT_POLLING,
+
+ /** Similar to GRPC_CQ_DEFAULT_POLLING except that the completion queues will
+ not contain any 'listening file descriptors' (i.e file descriptors used to
+ listen to incoming channels) */
+ GRPC_CQ_NON_LISTENING,
+
+ /** The completion queue will not have an associated pollset. Note that
+ grpc_completion_queue_next() or grpc_completion_queue_pluck() MUST still
+ be called to pop events from the completion queue; it is not required to
+ call them actively to make I/O progress */
+ GRPC_CQ_NON_POLLING
+} grpc_cq_polling_type;
+
+/** Specifies the type of APIs to use to pop events from the completion queue */
+typedef enum {
+ /** Events are popped out by calling grpc_completion_queue_next() API ONLY */
+ GRPC_CQ_NEXT = 1,
+
+ /** Events are popped out by calling grpc_completion_queue_pluck() API ONLY*/
+ GRPC_CQ_PLUCK
+} grpc_cq_completion_type;
+
+#define GRPC_CQ_CURRENT_VERSION 1
+typedef struct grpc_completion_queue_attributes {
+ /* The version number of this structure. More fields might be added to this
+ structure in future. */
+ int version; /* Set to GRPC_CQ_CURRENT_VERSION */
+
+ grpc_cq_completion_type cq_completion_type;
+
+ grpc_cq_polling_type cq_polling_type;
+} grpc_completion_queue_attributes;
+
+/** The completion queue factory structure is opaque to the callers of grpc */
+typedef struct grpc_completion_queue_factory grpc_completion_queue_factory;
+
#ifdef __cplusplus
}
#endif