Method CreateConnection
- Namespace
- Zedal.Sdk
- Assembly
- Zedal.Sdk.dll
CreateConnection(IEnumerable<Interceptor>, ZedalTransport, Action<HttpClientHandler>, string)
Creates a connection for production.
public IZedalConnection CreateConnection(IEnumerable<Interceptor> interceptors = null, ZedalTransport transport = ZedalTransport.Auto, Action<HttpClientHandler> configureHandler = null, string proxyUrl = null)
Parameters
interceptorsIEnumerable<Interceptor>Optional interceptors applied to the base invoker.
transportZedalTransportWire transport (defaults to Auto: probes HTTP/2 once, downgrades to gRPC-Web only on a proven HTTP/1.x-only backend with a gateway).
configureHandlerAction<HttpClientHandler>Optional hook to configure the HttpClientHandler (e.g. proxy) shared by the Auto probe and the channel.
proxyUrlstringOptional explicit SDK-scoped proxy URL. Takes precedence over the
INFOTECH_GRPC_PROXY_URLenvironment variable.
Returns
- IZedalConnection
Created connection instance.
CreateConnection(string, IEnumerable<Interceptor>, ZedalTransport, Action<HttpClientHandler>, string)
Creates a connection for an explicit address. The address does not have to be a ZEDAL server: this is the supported way to build channels to any gRPC target (e.g. the itsigner services) with the SDK's proxy convention, transport probing and message-size defaults — use CallInvoker or Channel to create the client stubs.
public IZedalConnection CreateConnection(string address, IEnumerable<Interceptor> interceptors = null, ZedalTransport transport = ZedalTransport.Auto, Action<HttpClientHandler> configureHandler = null, string proxyUrl = null)
Parameters
addressstringTarget server address.
interceptorsIEnumerable<Interceptor>Optional interceptors applied to the base invoker.
transportZedalTransportWire transport (defaults to Auto: probes HTTP/2 once, downgrades to gRPC-Web only on a proven HTTP/1.x-only backend with a gateway).
configureHandlerAction<HttpClientHandler>Optional hook to configure the HttpClientHandler (e.g. proxy) shared by the Auto probe and the channel.
proxyUrlstringOptional explicit SDK-scoped proxy URL. Takes precedence over the
INFOTECH_GRPC_PROXY_URLenvironment variable.
Returns
- IZedalConnection
Created connection instance.