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

◆ FindServicePoint() [3/3]

static ServicePoint System.Net.ServicePointManager.FindServicePoint ( Uri address,
IWebProxy? proxy )
inlinestatic

Definition at line 138 of file ServicePointManager.cs.

139 {
140 if (address == null)
141 {
142 throw new ArgumentNullException("address");
143 }
144 bool isProxy = ProxyAddressIfNecessary(ref address, proxy);
145 string key = MakeQueryString(address, isProxy);
147 ServicePoint target;
148 while (!s_servicePointTable.TryGetValue(key, out value) || !value.TryGetTarget(out target))
149 {
151 {
152 if (!item.Value.TryGetTarget(out var _))
153 {
154 s_servicePointTable.TryRemove(item);
155 }
156 }
157 target = new ServicePoint(address)
158 {
159 ConnectionLimit = DefaultConnectionLimit,
160 IdleSince = DateTime.Now,
163 };
165 }
166 target.IdleSince = DateTime.Now;
167 return target;
168 }
static string MakeQueryString(Uri address)
static readonly ConcurrentDictionary< string, WeakReference< ServicePoint > > s_servicePointTable
static bool ProxyAddressIfNecessary(ref Uri address, IWebProxy proxy)

References System.Net.ServicePointManager.DefaultConnectionLimit, System.Net.ServicePointManager.Expect100Continue, System.item, System.key, System.Net.ServicePointManager.MakeQueryString(), System.DateTime.Now, System.Net.ServicePointManager.ProxyAddressIfNecessary(), System.Net.ServicePointManager.s_servicePointTable, System.Net.ServicePointManager.UseNagleAlgorithm, and System.value.