GRPC Core  0.10.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
connector.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_CLIENT_CONFIG_CONNECTOR_H
35 #define GRPC_INTERNAL_CORE_CLIENT_CONFIG_CONNECTOR_H
36 
40 
43 
46 };
47 
48 typedef struct {
52  const struct sockaddr *addr;
53  int addr_len;
61 
62 typedef struct {
67  size_t num_filters;
69 
74  const grpc_connect_in_args *in_args,
75  grpc_connect_out_args *out_args, grpc_iomgr_closure *notify);
76 };
77 
81  const grpc_connect_in_args *in_args,
82  grpc_connect_out_args *out_args,
83  grpc_iomgr_closure *notify);
84 
85 #endif
Definition: channel_stack.h:64
void(* ref)(grpc_connector *connector)
Definition: connector.h:71
grpc_mdctx * metadata_context
metadata context
Definition: connector.h:59
gpr_timespec deadline
deadline for connection
Definition: connector.h:55
An array of arguments that can be passed around.
Definition: grpc.h:113
int addr_len
Definition: connector.h:53
Definition: secure_channel_create.c:54
void grpc_connector_unref(grpc_connector *connector)
Definition: connector.c:40
size_t num_filters
Definition: connector.h:67
const grpc_connector_vtable * vtable
Definition: connector.h:45
void grpc_connector_ref(grpc_connector *connector)
Definition: connector.c:36
Definition: connector.h:70
void grpc_connector_connect(grpc_connector *connector, const grpc_connect_in_args *in_args, grpc_connect_out_args *out_args, grpc_iomgr_closure *notify)
Definition: connector.c:44
Definition: metadata.c:98
Definition: connector.h:44
A closure over a grpc_iomgr_cb_func.
Definition: iomgr.h:45
grpc_pollset_set * interested_parties
set of pollsets interested in this connection
Definition: connector.h:50
grpc_transport * transport
the connected transport
Definition: connector.h:64
void(* connect)(grpc_connector *connector, const grpc_connect_in_args *in_args, grpc_connect_out_args *out_args, grpc_iomgr_closure *notify)
Definition: connector.h:73
Definition: connector.h:62
void(* unref)(grpc_connector *connector)
Definition: connector.h:72
Definition: connector.h:48
Definition: time.h:60
const grpc_channel_filter ** filters
any additional filters (owned by the caller of connect)
Definition: connector.h:66
Definition: pollset_set_posix.h:40
const struct sockaddr * addr
address to connect to
Definition: connector.h:52
Definition: transport_impl.h:67
const grpc_channel_args * channel_args
channel arguments (to be passed to transport)
Definition: connector.h:57