Language

CoreWebView2EnvironmentOptions.GetEffectiveAllowedPortRange Method

Definition

Retrieves the effective allowed port range for the specified component scope and transport protocol.

public void GetEffectiveAllowedPortRange(Microsoft.Web.WebView2.Core.CoreWebView2AllowedPortRangeScope scope, Microsoft.Web.WebView2.Core.CoreWebView2TransportProtocolKind protocol, out int minPort, out int maxPort);
member this.GetEffectiveAllowedPortRange : Microsoft.Web.WebView2.Core.CoreWebView2AllowedPortRangeScope * Microsoft.Web.WebView2.Core.CoreWebView2TransportProtocolKind * int * int -> unit
Public Sub GetEffectiveAllowedPortRange (scope As CoreWebView2AllowedPortRangeScope, protocol As CoreWebView2TransportProtocolKind, ByRef minPort As Integer, ByRef maxPort As Integer)

Parameters

scope
CoreWebView2AllowedPortRangeScope

Scope on which restrictions is applied.

protocol
CoreWebView2TransportProtocolKind

Transport protocol on which restrictions is applied.

minPort
Int32

Receives the minimum allowed port number (inclusive).

maxPort
Int32

Receives the maximum allowed port number (inclusive).

Remarks

GetEffectiveAllowedPortRange(CoreWebView2AllowedPortRangeScope, CoreWebView2TransportProtocolKind, Int32, Int32) returns the port range in effect previously set via SetAllowedPortRange(CoreWebView2AllowedPortRangeScope, CoreWebView2TransportProtocolKind, Int32, Int32).

If the scope is Default or if the specified scope is unset, then the Default port range is returned. A range of (0, 0) means that no port range has been set.

Querying Default only returns Default; it does not aggregate component-specific settings. If neither Default nor a component-specific scope is set, the default (0,0) (unset) is returned.

GetEffectiveAllowedPortRange Scope queryReturned Range
Pass WebRtc when only Default is setReturns Default range
Pass WebRtc when WebRtc explicitly setReturns WebRtc range
Pass WebRtc when Default unset and WebRtc unsetReturns (0, 0)
Pass WebRtc when Default set and WebRtc reset to (0, 0)Returns Default
Pass Default when only WebRtc setReturns (0,0)

Applies to

See also