diff options
author | Monty Brandenberg <monty@lindenlab.com> | 2012-06-19 15:43:29 -0400 |
---|---|---|
committer | Monty Brandenberg <monty@lindenlab.com> | 2012-06-19 15:43:29 -0400 |
commit | f0353abe7605778048d69ce3acb8f5ddd5693083 (patch) | |
tree | ea684f04a37f467b1cea9b0db93d9f112644f1cd /indra/llcorehttp/httpoptions.cpp | |
parent | 1cf8e785bad3562fac23feeb2343cfaec1b971bc (diff) |
Implement timeout and retry count options for requests.
Pretty straightforward. Still don't like how I'm managing
the options block. Struct? Accessors? Can't decide. But
the options now speed up the unit test runs even as I add
tests.
Diffstat (limited to 'indra/llcorehttp/httpoptions.cpp')
-rw-r--r-- | indra/llcorehttp/httpoptions.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/indra/llcorehttp/httpoptions.cpp b/indra/llcorehttp/httpoptions.cpp index 155fbda7f1..c11d89e619 100644 --- a/indra/llcorehttp/httpoptions.cpp +++ b/indra/llcorehttp/httpoptions.cpp @@ -34,14 +34,9 @@ namespace LLCore HttpOptions::HttpOptions() : RefCounted(true), mWantHeaders(false), - mTracing(0) -{} - - -HttpOptions::HttpOptions(const HttpOptions & rhs) - : RefCounted(true), - mWantHeaders(rhs.mWantHeaders), - mTracing(rhs.mTracing) + mTracing(0), + mTimeout(30), + mRetries(5) {} @@ -61,4 +56,16 @@ void HttpOptions::setTrace(long level) } +void HttpOptions::setTimeout(unsigned int timeout) +{ + mTimeout = timeout; +} + + +void HttpOptions::setRetries(unsigned int retries) +{ + mRetries = retries; +} + + } // end namespace LLCore |