GRPC Core  9.0.0
Data Structures | Macros | Functions
channel.h File Reference
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/channel_stack_builder.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/surface/channel_stack_type.h"

Go to the source code of this file.

Data Structures

struct  grpc_channel
 

Macros

#define CHANNEL_STACK_FROM_CHANNEL(c)   ((grpc_channel_stack*)((c) + 1))
 
#define GRPC_CHANNEL_INTERNAL_REF(channel, reason)   grpc_channel_internal_ref(channel, reason)
 
#define GRPC_CHANNEL_INTERNAL_UNREF(channel, reason)   grpc_channel_internal_unref(channel, reason)
 

Functions

grpc_channelgrpc_channel_create (const char *target, const grpc_channel_args *args, grpc_channel_stack_type channel_stack_type, grpc_transport *optional_transport, grpc_resource_user *resource_user=nullptr)
 
void grpc_channel_destroy_internal (grpc_channel *channel)
 The same as grpc_channel_destroy, but doesn't create an ExecCtx, and so is safe to use from within core. More...
 
grpc_channelgrpc_channel_create_with_builder (grpc_channel_stack_builder *builder, grpc_channel_stack_type channel_stack_type)
 
grpc_callgrpc_channel_create_pollset_set_call (grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_pollset_set *pollset_set, const grpc_slice &method, const grpc_slice *host, grpc_millis deadline, void *reserved)
 Create a call given a grpc_channel, in order to call method. More...
 
grpc_channel_stackgrpc_channel_get_channel_stack (grpc_channel *channel)
 Get a (borrowed) pointer to this channels underlying channel stack. More...
 
grpc_core::channelz::ChannelNodegrpc_channel_get_channelz_node (grpc_channel *channel)
 
size_t grpc_channel_get_call_size_estimate (grpc_channel *channel)
 
void grpc_channel_update_call_size_estimate (grpc_channel *channel, size_t size)
 
grpc_compression_options grpc_channel_compression_options (const grpc_channel *channel)
 Return the channel's compression options. More...
 
void grpc_channel_internal_ref (grpc_channel *channel, const char *reason)
 
void grpc_channel_internal_unref (grpc_channel *channel, const char *reason)
 

Macro Definition Documentation

◆ CHANNEL_STACK_FROM_CHANNEL

#define CHANNEL_STACK_FROM_CHANNEL (   c)    ((grpc_channel_stack*)((c) + 1))

◆ GRPC_CHANNEL_INTERNAL_REF

#define GRPC_CHANNEL_INTERNAL_REF (   channel,
  reason 
)    grpc_channel_internal_ref(channel, reason)

◆ GRPC_CHANNEL_INTERNAL_UNREF

#define GRPC_CHANNEL_INTERNAL_UNREF (   channel,
  reason 
)    grpc_channel_internal_unref(channel, reason)

Function Documentation

◆ grpc_channel_compression_options()

grpc_compression_options grpc_channel_compression_options ( const grpc_channel channel)
inline

Return the channel's compression options.

◆ grpc_channel_create()

grpc_channel* grpc_channel_create ( const char *  target,
const grpc_channel_args args,
grpc_channel_stack_type  channel_stack_type,
grpc_transport optional_transport,
grpc_resource_user resource_user = nullptr 
)

◆ grpc_channel_create_pollset_set_call()

grpc_call* grpc_channel_create_pollset_set_call ( grpc_channel channel,
grpc_call parent_call,
uint32_t  propagation_mask,
grpc_pollset_set pollset_set,
const grpc_slice method,
const grpc_slice host,
grpc_millis  deadline,
void *  reserved 
)

Create a call given a grpc_channel, in order to call method.

Progress is tied to activity on pollset_set. The returned call object is meant to be used with grpc_call_start_batch_and_execute, which relies on callbacks to signal completions. method and host need only live through the invocation of this function. If parent_call is non-NULL, it must be a server-side call. It will be used to propagate properties from the server call to this new client call, depending on the value of propagation_mask (see propagation_bits.h for possible values)

◆ grpc_channel_create_with_builder()

grpc_channel* grpc_channel_create_with_builder ( grpc_channel_stack_builder builder,
grpc_channel_stack_type  channel_stack_type 
)

◆ grpc_channel_destroy_internal()

void grpc_channel_destroy_internal ( grpc_channel channel)

The same as grpc_channel_destroy, but doesn't create an ExecCtx, and so is safe to use from within core.

◆ grpc_channel_get_call_size_estimate()

size_t grpc_channel_get_call_size_estimate ( grpc_channel channel)

◆ grpc_channel_get_channel_stack()

grpc_channel_stack * grpc_channel_get_channel_stack ( grpc_channel channel)
inline

Get a (borrowed) pointer to this channels underlying channel stack.

◆ grpc_channel_get_channelz_node()

grpc_core::channelz::ChannelNode * grpc_channel_get_channelz_node ( grpc_channel channel)
inline

◆ grpc_channel_internal_ref()

void grpc_channel_internal_ref ( grpc_channel channel,
const char *  reason 
)
inline

◆ grpc_channel_internal_unref()

void grpc_channel_internal_unref ( grpc_channel channel,
const char *  reason 
)
inline

◆ grpc_channel_update_call_size_estimate()

void grpc_channel_update_call_size_estimate ( grpc_channel channel,
size_t  size 
)