Class ChannelBase (2.63.0)

public abstract class ChannelBase

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 Task ShutdownAsyncCore()

Provides implementation of a non-virtual public member.

Returns
Type Description
Task

Extension Methods