summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpinternal.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcorehttp/_httpinternal.h')
-rw-r--r--indra/llcorehttp/_httpinternal.h52
1 files changed, 26 insertions, 26 deletions
diff --git a/indra/llcorehttp/_httpinternal.h b/indra/llcorehttp/_httpinternal.h
index 768ef98330..2a191fa550 100644
--- a/indra/llcorehttp/_httpinternal.h
+++ b/indra/llcorehttp/_httpinternal.h
@@ -106,17 +106,17 @@ namespace LLCore
// Maxium number of policy classes that can be defined.
// *TODO: Currently limited to the default class + 1, extend.
// (TSN: should this be more dynamically sized. Is there a reason to hard limit the number of policies?)
-const int HTTP_POLICY_CLASS_LIMIT = 32;
+constexpr int HTTP_POLICY_CLASS_LIMIT = 32;
// Debug/informational tracing. Used both
// as a global option and in per-request traces.
-const int HTTP_TRACE_OFF = 0;
-const int HTTP_TRACE_LOW = 1;
-const int HTTP_TRACE_CURL_HEADERS = 2;
-const int HTTP_TRACE_CURL_BODIES = 3;
+constexpr int HTTP_TRACE_OFF = 0;
+constexpr int HTTP_TRACE_LOW = 1;
+constexpr int HTTP_TRACE_CURL_HEADERS = 2;
+constexpr int HTTP_TRACE_CURL_BODIES = 3;
-const int HTTP_TRACE_MIN = HTTP_TRACE_OFF;
-const int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
+constexpr int HTTP_TRACE_MIN = HTTP_TRACE_OFF;
+constexpr int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
// Request retry limits
//
@@ -127,41 +127,41 @@ const int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
// We want to span a few windows to allow transport to slow
// after onset of the throttles and then recover without a final
// failure. Other systems may need other constants.
-const int HTTP_RETRY_COUNT_DEFAULT = 5;
-const int HTTP_RETRY_COUNT_MIN = 0;
-const int HTTP_RETRY_COUNT_MAX = 100;
-const HttpTime HTTP_RETRY_BACKOFF_MIN_DEFAULT = 1E6L; // 1 sec
-const HttpTime HTTP_RETRY_BACKOFF_MAX_DEFAULT = 5E6L; // 5 sec
-const HttpTime HTTP_RETRY_BACKOFF_MAX = 20E6L; // 20 sec
+constexpr int HTTP_RETRY_COUNT_DEFAULT = 5;
+constexpr int HTTP_RETRY_COUNT_MIN = 0;
+constexpr int HTTP_RETRY_COUNT_MAX = 100;
+constexpr HttpTime HTTP_RETRY_BACKOFF_MIN_DEFAULT = 1000000UL; // 1 sec
+constexpr HttpTime HTTP_RETRY_BACKOFF_MAX_DEFAULT = 50000006UL; // 5 sec
+constexpr HttpTime HTTP_RETRY_BACKOFF_MAX = 20000000UL; // 20 sec
-const int HTTP_REDIRECTS_DEFAULT = 10;
+constexpr int HTTP_REDIRECTS_DEFAULT = 10;
// Timeout value used for both connect and protocol exchange.
// Retries and time-on-queue are not included and aren't
// accounted for.
-const long HTTP_REQUEST_TIMEOUT_DEFAULT = 30L;
-const long HTTP_REQUEST_XFER_TIMEOUT_DEFAULT = 0L;
-const long HTTP_REQUEST_TIMEOUT_MIN = 0L;
-const long HTTP_REQUEST_TIMEOUT_MAX = 3600L;
+constexpr long HTTP_REQUEST_TIMEOUT_DEFAULT = 30L;
+constexpr long HTTP_REQUEST_XFER_TIMEOUT_DEFAULT = 0L;
+constexpr long HTTP_REQUEST_TIMEOUT_MIN = 0L;
+constexpr long HTTP_REQUEST_TIMEOUT_MAX = 3600L;
// Limits on connection counts
-const int HTTP_CONNECTION_LIMIT_DEFAULT = 8;
-const int HTTP_CONNECTION_LIMIT_MIN = 1;
-const int HTTP_CONNECTION_LIMIT_MAX = 256;
+constexpr int HTTP_CONNECTION_LIMIT_DEFAULT = 8;
+constexpr int HTTP_CONNECTION_LIMIT_MIN = 1;
+constexpr int HTTP_CONNECTION_LIMIT_MAX = 256;
// Pipelining limits
-const long HTTP_PIPELINING_DEFAULT = 0L;
-const long HTTP_PIPELINING_MAX = 20L;
+constexpr long HTTP_PIPELINING_DEFAULT = 0L;
+constexpr long HTTP_PIPELINING_MAX = 20L;
// Miscellaneous defaults
-const bool HTTP_USE_RETRY_AFTER_DEFAULT = true;
-const long HTTP_THROTTLE_RATE_DEFAULT = 0L;
+constexpr bool HTTP_USE_RETRY_AFTER_DEFAULT = true;
+constexpr long HTTP_THROTTLE_RATE_DEFAULT = 0L;
// Tuning parameters
// Time worker thread sleeps after a pass through the
// request, ready and active queues.
-const int HTTP_SERVICE_LOOP_SLEEP_NORMAL_MS = 2;
+constexpr int HTTP_SERVICE_LOOP_SLEEP_NORMAL_MS = 2;
// Block allocation size (a tuning parameter) is found
// in bufferarray.h.