Class ChannelBase (2.48.0)

public abstract class ChannelBase : object

Base class for gRPC channel. Channels are an abstraction of long-lived connections to remote servers.

Inheritance

Object > ChannelBase

Namespace

Grpc.Core

Assembly

Grpc.Core.Api.dll

Constructors

ChannelBase(String)

protected ChannelBase(string target)

Initializes a new instance of ChannelBase class that connects to a specific host.

Parameter
Name Description
target String

Target of the channel.

Properties

Target

public string Target { get; }

The original target used to create the channel.

Property Value
Type Description
String

Methods

CreateCallInvoker()

public abstract CallInvoker CreateCallInvoker()

Create a new CallInvoker for the channel.

Returns
Type Description
CallInvoker

A new CallInvoker.

ShutdownAsync()

public Task ShutdownAsync()

Shuts down the channel cleanly. It is strongly recommended to shutdown the channel once you stopped using it.

Returns
Type Description
Task
Remarks

Guidance for implementors: This method doesn't wait for all calls on this channel to finish (nor does it have to explicitly cancel all outstanding calls). It is user's responsibility to make sure all the calls on this channel have finished (successfully or with an error) before shutting down the channel to ensure channel shutdown won't impact the outcome of those remote calls.

ShutdownAsyncCore()

protected virtual async Task ShutdownAsyncCore()

Provides implementation of a non-virtual public member.

Returns
Type Description
Task

Extension Methods