summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/httpcommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcorehttp/httpcommon.h')
-rw-r--r--indra/llcorehttp/httpcommon.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llcorehttp/httpcommon.h b/indra/llcorehttp/httpcommon.h
index fd2661b700..42b75edb41 100644
--- a/indra/llcorehttp/httpcommon.h
+++ b/indra/llcorehttp/httpcommon.h
@@ -114,6 +114,9 @@ namespace LLCore
typedef void * HttpHandle;
#define LLCORE_HTTP_HANDLE_INVALID (NULL)
+/// For internal scheduling and metrics, we use a microsecond
+/// timebase compatible with the environment.
+typedef U64 HttpTime;
/// Error codes defined by the library itself as distinct from
/// libcurl (or any other transport provider).
@@ -180,6 +183,15 @@ struct HttpStatus
mStatus(status)
{}
+ HttpStatus(int http_status)
+ : mType(http_status),
+ mStatus(http_status >= 200 && http_status <= 299
+ ? HE_SUCCESS
+ : HE_REPLY_ERROR)
+ {
+ llassert(http_status >= 100 && http_status <= 999);
+ }
+
HttpStatus(const HttpStatus & rhs)
: mType(rhs.mType),
mStatus(rhs.mStatus)