<PackageReference Include="Grpc.Net.Client" Version="2.67.0" />

Grpc.Net.Client.Balancer.Subchannel

public sealed class Subchannel : IDisposable
Represents a logical connection. A subchannel is created with one or more addresses to equivalent servers.

A subchannel maintains at most one physical connection (aka transport) for sending new gRPC calls. If there isn't an active transport, and a call is assigned to the subchannel, it will create a new transport. A transport won't be created otherwise unless RequestConnection is called to create a transport if there isn't any.

Note: Experimental API that can change or be removed without any prior notice.

namespace Grpc.Net.Client.Balancer { public sealed class Subchannel : IDisposable { public BalancerAddress CurrentAddress { get; } public BalancerAttributes Attributes { get; } public IDisposable OnStateChanged(Action<SubchannelState> callback); public void UpdateAddresses(IReadOnlyList<BalancerAddress> addresses); public void RequestConnection(); public IReadOnlyList<BalancerAddress> GetAddresses(); public void Dispose(); } }