CoreWebView2EnvironmentOptions.GetEffectiveAllowedPortRange Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 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 query | Returned Range | |
|---|---|---|
| Pass WebRtc when only Default is set | Returns Default range | |
| Pass WebRtc when WebRtc explicitly set | Returns WebRtc range | |
| Pass WebRtc when Default unset and WebRtc unset | Returns (0, 0) | |
| Pass WebRtc when Default set and WebRtc reset to (0, 0) | Returns Default | |
| Pass Default when only WebRtc set | Returns (0,0) |