GRPC Core 0.10.0.0

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
client_channel.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright 2015, Google Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above
13 * copyright notice, this list of conditions and the following disclaimer
14 * in the documentation and/or other materials provided with the
15 * distribution.
16 * * Neither the name of Google Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 */
33
34 #ifndef GRPC_INTERNAL_CORE_CHANNEL_CLIENT_CHANNEL_H
35 #define GRPC_INTERNAL_CORE_CHANNEL_CLIENT_CHANNEL_H
36
37 #include "src/core/channel/channel_stack.h"
38 #include "src/core/client_config/resolver.h"
39
40 /* A client channel is a channel that begins disconnected, and can connect
41 to some endpoint on demand. If that endpoint disconnects, it will be
42 connected to again later.
43
44 Calls on a disconnected client channel are queued until a connection is
45 established. */
46
47 extern const grpc_channel_filter grpc_client_channel_filter;
48
49 /* post-construction initializer to let the client channel know which
50 transport setup it should cancel upon destruction, or initiate when it needs
51 a connection */
52 void grpc_client_channel_set_resolver(grpc_channel_stack *channel_stack,
53 grpc_resolver *resolver);
54
55 grpc_connectivity_state grpc_client_channel_check_connectivity_state(
56 grpc_channel_element *elem, int try_to_connect);
57
58 void grpc_client_channel_watch_connectivity_state(
59 grpc_channel_element *elem, grpc_connectivity_state *state,
60 grpc_iomgr_closure *on_complete);
61
62 grpc_pollset_set *grpc_client_channel_get_connecting_pollset_set(grpc_channel_element *elem);
63
64 void grpc_client_channel_add_interested_party(grpc_channel_element *channel,
65 grpc_pollset *pollset);
66 void grpc_client_channel_del_interested_party(grpc_channel_element *channel,
67 grpc_pollset *pollset);
68
69 #endif /* GRPC_INTERNAL_CORE_CHANNEL_CLIENT_CHANNEL_H */
grpc_channel_filter
Definition: channel_stack.h:64
grpc_connectivity_state
grpc_connectivity_state
Connectivity state of a channel.
Definition: grpc.h:139
grpc_channel_stack
Definition: channel_stack.h:132
grpc_client_channel_watch_connectivity_state
void grpc_client_channel_watch_connectivity_state(grpc_channel_element *elem, grpc_connectivity_state *state, grpc_iomgr_closure *on_complete)
Definition: client_channel.c:718
channel_stack.h
grpc_client_channel_set_resolver
void grpc_client_channel_set_resolver(grpc_channel_stack *channel_stack, grpc_resolver *resolver)
Definition: client_channel.c:688
grpc_pollset
Definition: pollset_posix.h:48
grpc_resolver
grpc_resolver provides grpc_client_config objects to grpc_channel objects
Definition: resolver.h:46
resolver.h
grpc_client_channel_filter
const grpc_channel_filter grpc_client_channel_filter
Definition: client_channel.c:675
grpc_iomgr_closure
A closure over a grpc_iomgr_cb_func.
Definition: iomgr.h:45
grpc_client_channel_check_connectivity_state
grpc_connectivity_state grpc_client_channel_check_connectivity_state(grpc_channel_element *elem, int try_to_connect)
Definition: client_channel.c:701
grpc_channel_element
Definition: channel_stack.h:116
grpc_client_channel_get_connecting_pollset_set
grpc_pollset_set * grpc_client_channel_get_connecting_pollset_set(grpc_channel_element *elem)
Definition: client_channel.c:728
grpc_pollset_set
Definition: pollset_set_posix.h:40
grpc_client_channel_add_interested_party
void grpc_client_channel_add_interested_party(grpc_channel_element *channel, grpc_pollset *pollset)
Definition: client_channel.c:733
grpc_client_channel_del_interested_party
void grpc_client_channel_del_interested_party(grpc_channel_element *channel, grpc_pollset *pollset)
Definition: client_channel.c:739