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
Data Structures | Macros | Typedefs | Functions
subchannel.c File Reference
`#include "src/core/client_config/subchannel.h"`
`#include <string.h>`
`#include <grpc/support/alloc.h>`
`#include "src/core/channel/channel_args.h"`
`#include "src/core/channel/client_channel.h"`
`#include "src/core/channel/connected_channel.h"`
`#include "src/core/iomgr/alarm.h"`
`#include "src/core/transport/connectivity_state.h"`
`#include "src/core/surface/channel.h"`

## Data Structures
struct | connection
struct | state_watcher
struct | waiting_for_connect
struct | grpc_subchannel
struct | grpc_subchannel_call

## Macros
#define | GRPC_SUBCHANNEL_MIN_CONNECT_TIMEOUT_SECONDS 20
#define | GRPC_SUBCHANNEL_INITIAL_CONNECT_BACKOFF_SECONDS 1
#define | GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER 1.6
#define | GRPC_SUBCHANNEL_RECONNECT_MAX_BACKOFF_SECONDS 120
#define | GRPC_SUBCHANNEL_RECONNECT_JITTER 0.2
#define | SUBCHANNEL_CALL_TO_CALL_STACK(call) ((grpc_call_stack *)((call) + 1))
#define | CHANNEL_STACK_FROM_CONNECTION(con) ((grpc_channel_stack *)((con) + 1))
#define | SUBCHANNEL_REF_LOCKED(p, r) subchannel_ref_locked((p))
#define | SUBCHANNEL_UNREF_LOCKED(p, r) subchannel_unref_locked((p))
#define | CONNECTION_REF_LOCKED(p, r) connection_ref_locked((p))
#define | CONNECTION_UNREF_LOCKED(p, r) connection_unref_locked((p))
#define | REF_PASS_ARGS
#define | REF_LOG(name, p)
#define | UNREF_LOG(name, p)

## Typedefs
typedef struct waiting_for_connect | waiting_for_connect

## Functions
void | grpc_subchannel_ref (grpc_subchannel *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS)
void | grpc_subchannel_unref (grpc_subchannel *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS)
void | grpc_subchannel_add_interested_party (grpc_subchannel *c, grpc_pollset *pollset)
void | grpc_subchannel_del_interested_party (grpc_subchannel *c, grpc_pollset *pollset)
grpc_subchannel * | grpc_subchannel_create (grpc_connector *connector, grpc_subchannel_args *args)
| create a subchannel given a connector More...
void | grpc_subchannel_create_call (grpc_subchannel *c, grpc_pollset *pollset, grpc_subchannel_call **target, grpc_iomgr_closure *notify)
| construct a call (possibly asynchronously) More...
grpc_connectivity_state | grpc_subchannel_check_connectivity (grpc_subchannel *c)
| poll the current connectivity state of a channel More...
void | grpc_subchannel_notify_on_state_change (grpc_subchannel *c, grpc_connectivity_state *state, grpc_iomgr_closure *notify)
| call notify when the connectivity state of a channel changes from *state. More...
void | grpc_subchannel_process_transport_op (grpc_subchannel *c, grpc_transport_op *op)
| process a transport level op More...
void | grpc_subchannel_call_ref (grpc_subchannel_call *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS)
void | grpc_subchannel_call_unref (grpc_subchannel_call *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS)
char * | grpc_subchannel_call_get_peer (grpc_subchannel_call *call)
| continue querying for peer More...
void | grpc_subchannel_call_process_op (grpc_subchannel_call *call, grpc_transport_stream_op *op)
| continue processing a transport op More...

## Macro Definition Documentation

#define CHANNEL_STACK_FROM_CONNECTION | ( |  | con | ) | ((grpc_channel_stack *)((con) + 1))

#define CONNECTION_REF_LOCKED | ( |  | p,
|  |  | r
| ) |  | connection_ref_locked((p))

#define CONNECTION_UNREF_LOCKED | ( |  | p,
|  |  | r
| ) |  | connection_unref_locked((p))

#define GRPC_SUBCHANNEL_INITIAL_CONNECT_BACKOFF_SECONDS 1

#define GRPC_SUBCHANNEL_MIN_CONNECT_TIMEOUT_SECONDS 20

#define GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER 1.6

#define GRPC_SUBCHANNEL_RECONNECT_JITTER 0.2

#define GRPC_SUBCHANNEL_RECONNECT_MAX_BACKOFF_SECONDS 120

#define REF_LOG | ( |  | name,
|  |  | p
| ) |  |

Value:
do { \
} while (0)

#define REF_PASS_ARGS

#define SUBCHANNEL_CALL_TO_CALL_STACK | ( |  | call | ) | ((grpc_call_stack *)((call) + 1))

#define SUBCHANNEL_REF_LOCKED | ( |  | p,
|  |  | r
| ) |  | subchannel_ref_locked((p))

#define SUBCHANNEL_UNREF_LOCKED | ( |  | p,
|  |  | r
| ) |  | subchannel_unref_locked((p))

#define UNREF_LOG | ( |  | name,
|  |  | p
| ) |  |

Value:
do { \
} while (0)

## Typedef Documentation

typedef struct waiting_for_connect waiting_for_connect

## Function Documentation

void grpc_subchannel_add_interested_party | ( | grpc_subchannel * | c,
|  | grpc_pollset * | pollset
| ) |  |

char* grpc_subchannel_call_get_peer | ( | grpc_subchannel_call * | call | ) |

continue querying for peer

void grpc_subchannel_call_process_op | ( | grpc_subchannel_call * | call,
|  | grpc_transport_stream_op * | op
| ) |  |

continue processing a transport op

void grpc_subchannel_call_ref | ( | grpc_subchannel_call *c | GRPC_SUBCHANNEL_REF_EXTRA_ARGS | ) |

void grpc_subchannel_call_unref | ( | grpc_subchannel_call *c | GRPC_SUBCHANNEL_REF_EXTRA_ARGS | ) |

grpc_connectivity_state grpc_subchannel_check_connectivity | ( | grpc_subchannel * | c | ) |

poll the current connectivity state of a channel

grpc_subchannel* grpc_subchannel_create | ( | grpc_connector * | connector,
|  | grpc_subchannel_args * | args
| ) |  |

create a subchannel given a connector

void grpc_subchannel_create_call | ( | grpc_subchannel * | c,
|  | grpc_pollset * | pollset,
|  | grpc_subchannel_call ** | target,
|  | grpc_iomgr_closure * | notify
| ) |  |

construct a call (possibly asynchronously)

void grpc_subchannel_del_interested_party | ( | grpc_subchannel * | c,
|  | grpc_pollset * | pollset
| ) |  |

void grpc_subchannel_notify_on_state_change | ( | grpc_subchannel * | channel,
|  | grpc_connectivity_state * | state,
|  | grpc_iomgr_closure * | notify
| ) |  |

call notify when the connectivity state of a channel changes from *state.

Updates *state with the new state of the channel

void grpc_subchannel_process_transport_op | ( | grpc_subchannel * | c,
|  | grpc_transport_op * | op
| ) |  |

process a transport level op

void grpc_subchannel_ref | ( | grpc_subchannel *c | GRPC_SUBCHANNEL_REF_EXTRA_ARGS | ) |

void grpc_subchannel_unref | ( | grpc_subchannel *c | GRPC_SUBCHANNEL_REF_EXTRA_ARGS | ) |