Grpc.Net.Client.GrpcChannel
Represents a gRPC channel. Channels are an abstraction of long-lived connections to remote servers.
Client objects can reuse the same channel. Creating a channel is an expensive operation compared to invoking
a remote call so in general you should reuse a single channel for as many calls as possible.
Gets current connectivity state of this channel.
After the channel has been shutdown, Shutdown is returned.
This API is only supported when the channel is configured with a SocketsHttpHandler HTTP transport.
Note: Experimental API that can change or be removed without any prior notice.
Creates a GrpcChannel for the specified address.
Creates a GrpcChannel for the specified address and configuration options.
Creates a GrpcChannel for the specified address.
Creates a GrpcChannel for the specified address and configuration options.
Allows explicitly requesting channel to connect without starting an RPC.
Returned task completes once State Ready was seen.
There is no need to call this explicitly unless your use case requires that.
Starting an RPC on a new channel will request connection implicitly.
This API is only supported when the channel is configured with a SocketsHttpHandler HTTP transport.
Note: Experimental API that can change or be removed without any prior notice.
Releases the resources used by the GrpcChannel class.
Clients created with the channel can't be used after the channel is disposed.
public Task WaitForStateChangedAsync(ConnectivityState lastObservedState, CancellationToken cancellationToken = default)
Wait for channel's state to change. The task completes when State becomes
different from lastObservedState.
This API is only supported when the channel is configured with a SocketsHttpHandler HTTP transport.
Note: Experimental API that can change or be removed without any prior notice.