Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ StartMonitoringNetworkChanges()

void System.Net.Http.HttpConnectionPoolManager.StartMonitoringNetworkChanges ( )
inline

Definition at line 173 of file HttpConnectionPoolManager.cs.

174 {
175 if (_networkChangeCleanup != null)
176 {
177 return;
178 }
181 {
182 if (poolsRef.TryGetTarget(out var target))
183 {
184 foreach (HttpConnectionPool value in target.Values)
185 {
186 value.OnNetworkChanged();
187 }
188 }
189 };
190 NetworkChangeCleanup networkChangeCleanup = new NetworkChangeCleanup(networkAddressChangedEventHandler);
192 {
193 GC.SuppressFinalize(networkChangeCleanup);
194 return;
195 }
197 {
199 {
200 NetworkChange.NetworkAddressChanged += networkAddressChangedEventHandler;
201 return;
202 }
203 }
204 NetworkChange.NetworkAddressChanged += networkAddressChangedEventHandler;
205 }
readonly ConcurrentDictionary< HttpConnectionKey, HttpConnectionPool > _pools
static AsyncFlowControl SuppressFlow()
static int CompareExchange(ref int location1, int value, int comparand)
delegate void NetworkAddressChangedEventHandler(object? sender, EventArgs e)

References System.Net.Http.HttpConnectionPoolManager._networkChangeCleanup, System.Net.Http.HttpConnectionPoolManager._pools, System.Threading.Interlocked.CompareExchange(), System.Threading.ExecutionContext.IsFlowSuppressed(), System.Net.NetworkInformation.NetworkAddressChangedEventHandler(), System.GC.SuppressFinalize(), System.Threading.ExecutionContext.SuppressFlow(), System.value, and System.Collections.Generic.Dictionary< TKey, TValue >.Values.

Referenced by System.Net.Http.HttpConnectionPool.HandleAltSvc().