@@ -23,7 +23,7 @@ Common scenarios:
2323
2424Usage steps:
25251 . Create ` CoreWebView2EnvironmentOptions ` .
26- 2 . Call ` SetAllowedPortRange ` for ` COREWEBVIEW2_NETWORK_PROTOCOL_UDP ` .
26+ 2 . Call ` SetAllowedPortRange ` for ` COREWEBVIEW2_TRANSPORT_PROTOCOL_UDP ` .
27273 . Pass the options when creating the WebView2 environment.
2828
2929
@@ -38,11 +38,11 @@ if (options.As(&optionsStaging10) == S_OK)
3838 const INT32 udpMin = 50000, udpMax = 55000;
3939
4040 CHECK_FAILURE (optionsStaging10->SetAllowedPortRange(
41- COREWEBVIEW2_NETWORK_PROTOCOL_UDP , udpMin, udpMax));
41+ COREWEBVIEW2_TRANSPORT_PROTOCOL_UDP , udpMin, udpMax));
4242
4343 // Get the configured port range
4444 CHECK_FAILURE (optionsStaging10->GetAllowedPortRange(
45- COREWEBVIEW2_NETWORK_PROTOCOL_UDP , &m_udpPortRange.minPort,
45+ COREWEBVIEW2_TRANSPORT_PROTOCOL_UDP , &m_udpPortRange.minPort,
4646 &m_udpPortRange.maxPort));
4747}
4848
@@ -64,11 +64,11 @@ if (optionsStaging10 != null)
6464 const int udpMin = 50000 , udpMax = 55000 ;
6565
6666 optionsStaging10 .SetAllowedPortRange (
67- COREWEBVIEW2_NETWORK_PROTOCOL_UDP , udpMin , udpMax );
67+ COREWEBVIEW2_TRANSPORT_PROTOCOL_UDP , udpMin , udpMax );
6868
6969 // Get the configured port range
7070 optionsStaging10 .GetAllowedPortRange (
71- COREWEBVIEW2_NETWORK_PROTOCOL_UDP , out m_udpPortRange .minPort ,
71+ COREWEBVIEW2_TRANSPORT_PROTOCOL_UDP , out m_udpPortRange .minPort ,
7272 out m_udpPortRange .maxPort );
7373}
7474
@@ -80,21 +80,21 @@ OnCreateEnvironmentCompleted(environment);
8080# API Details
8181### C++
8282```
83- /// Specifies the network protocol type for port configuration.
83+ /// Specifies the transport protocol type for port configuration.
8484[v1_enum]
85- typedef enum COREWEBVIEW2_NETWORK_PROTOCOL {
85+ typedef enum COREWEBVIEW2_TRANSPORT_PROTOCOL {
8686 /// Transmission Control Protocol - reliable, connection-oriented protocol.
87- COREWEBVIEW2_NETWORK_PROTOCOL_TCP ,
87+ COREWEBVIEW2_TRANSPORT_PROTOCOL_TCP ,
8888 /// User Datagram Protocol - fast, connectionless protocol.
89- COREWEBVIEW2_NETWORK_PROTOCOL_UDP ,
90- } COREWEBVIEW2_NETWORK_PROTOCOL ;
89+ COREWEBVIEW2_TRANSPORT_PROTOCOL_UDP ,
90+ } COREWEBVIEW2_TRANSPORT_PROTOCOL ;
9191
9292/// Additional options used to create WebView2 Environment to manage port range configuration.
9393[uuid(eaf22436-27a1-5e3d-a4e3-84d7e7a69a1a), object, pointer_default(unique)]
9494interface ICoreWebView2StagingEnvironmentOptions10 : IUnknown {
95- /// Sets the allowed port range for the specified network protocol.
95+ /// Sets the allowed port range for the specified transport protocol.
9696 /// This allows WebView2 to work within enterprise firewall constraints
97- /// by restricting network communication to the specified port range.
97+ /// by restricting transport communication to the specified port range.
9898 /// Currently only WebRTC UDP port restriction is supported.
9999 /// minPort and maxPort must be in the range 1025-65535 (inclusive).
100100 /// Calls with invalid ranges fail with E_INVALIDARG.
@@ -103,27 +103,27 @@ interface ICoreWebView2StagingEnvironmentOptions10 : IUnknown {
103103 /// If (0,0) is passed as (minPort, maxPort), API will treat this as default
104104 /// value and no restrictions on ports will be applied.
105105 ///
106- /// `protocol` The network protocol (TCP or UDP) for which to set the port range.
106+ /// `protocol` The transport protocol (TCP or UDP) for which to set the port range.
107107 /// `minPort` The minimum port number in the allowed range (inclusive).
108108 /// `maxPort` The maximum port number in the allowed range (inclusive).
109109 ///
110110 HRESULT SetAllowedPortRange(
111- [in] COREWEBVIEW2_NETWORK_PROTOCOL protocol,
111+ [in] COREWEBVIEW2_TRANSPORT_PROTOCOL protocol,
112112 [in] INT32 minPort,
113113 [in] INT32 maxPort
114114 );
115115
116- /// Gets the allowed port range for the specified network protocol.
116+ /// Gets the allowed port range for the specified transport protocol.
117117 /// Returns the current port range configuration that was set via
118118 /// SetAllowedPortRange. Default value is (0,0) which means no restrictions applied
119119 /// and ports are allocated randomly between system's ephemeral range 1025-65535 (inclusive).
120120 ///
121- /// `protocol` The network protocol (TCP or UDP) for which to get the port range.
121+ /// `protocol` The transport protocol (TCP or UDP) for which to get the port range.
122122 /// `minPort` Receives the minimum port number in the allowed range.
123123 /// `maxPort` Receives the maximum port number in the allowed range.
124124 ///
125125 HRESULT GetAllowedPortRange(
126- [in] COREWEBVIEW2_NETWORK_PROTOCOL protocol,
126+ [in] COREWEBVIEW2_TRANSPORT_PROTOCOL protocol,
127127 [out] INT32* minPort,
128128 [out] INT32* maxPort
129129 );
0 commit comments