Class HttpClientCache
A cache of HttpClient objects. The GetNextClient method does a round robin cycle through the clients to distribute the load even across.
public class HttpClientCache : IDisposable
- Inheritance
-
HttpClientCache
- Implements
- Inherited Members
Constructors
HttpClientCache(HttpClient[])
Constructs a container for a cache of HttpClient objects
public HttpClientCache(HttpClient[] clients)
Parameters
clients
HttpClient[]The HttpClient to cache
Methods
Dispose()
Disposes the HttpClientCache.
public void Dispose()
Dispose(bool)
Dispose the HttpClientCache
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
GetNextClient()
Returns the next HttpClient using a round robin rotation. It is expected that individual clients will be used by more then one Thread.
public HttpClient GetNextClient()