summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httplibcurl.h
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-07-12 15:00:24 -0400
committerMonty Brandenberg <monty@lindenlab.com>2013-07-12 15:00:24 -0400
commiteff651cffca60f2b69f6c596a8e9aa9e1ab44d3c (patch)
tree43b7a995f0e3df6942643735e6e1ea615e7a1b0c /indra/llcorehttp/_httplibcurl.h
parentfb734d621e6fa2004d191849783e81da75992d06 (diff)
SH-4312 Configuration data between viewer and llcorehttp is clumsy.
Much improved. Unified the global and class options into a single option list. Implemented static and dynamic setting paths as much as possible. Dynamic path does require packet/RPC but otherwise there's near unification. Dynamic modes can't get values back yet due to the response/notifier scheme but this doesn't bother me. Flatten global and class options into simpler struct-like entities. Setter/getter available on these when needed (external APIs) but code can otherwise fiddle directly when it knows what to do. Much duplicated options/state removed from HttpPolicy. Comments cleaned up. Threads better described and consistently mentioned in API docs. Integration test extended for 503 responses with Reply-After headers.
Diffstat (limited to 'indra/llcorehttp/_httplibcurl.h')
-rwxr-xr-xindra/llcorehttp/_httplibcurl.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/llcorehttp/_httplibcurl.h b/indra/llcorehttp/_httplibcurl.h
index 611f029ef5..0ec90437bb 100755
--- a/indra/llcorehttp/_httplibcurl.h
+++ b/indra/llcorehttp/_httplibcurl.h
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Second Life Viewer Source Code
- * Copyright (C) 2012, Linden Research, Inc.
+ * Copyright (C) 2012-2013, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -71,16 +71,22 @@ public:
///
/// @return Indication of how long this method is
/// willing to wait for next service call.
+ ///
+ /// Threading: called by worker thread.
HttpService::ELoopSpeed processTransport();
/// Add request to the active list. Caller is expected to have
/// provided us with a reference count on the op to hold the
/// request. (No additional references will be added.)
+ ///
+ /// Threading: called by worker thread.
void addOp(HttpOpRequest * op);
/// One-time call to set the number of policy classes to be
/// serviced and to create the resources for each. Value
/// must agree with HttpPolicy::setPolicies() call.
+ ///
+ /// Threading: called by init thread.
void start(int policy_count);
/// Synchronously stop libcurl operations. All active requests
@@ -91,9 +97,13 @@ public:
/// respective reply queues.
///
/// Can be restarted with a start() call.
+ ///
+ /// Threading: called by worker thread.
void shutdown();
/// Return global and per-class counts of active requests.
+ ///
+ /// Threading: called by worker thread.
int getActiveCount() const;
int getActiveCountInClass(int policy_class) const;
@@ -103,6 +113,7 @@ public:
///
/// @return True if handle was found and operation canceled.
///
+ /// Threading: called by worker thread.
bool cancel(HttpHandle handle);
protected:
@@ -121,7 +132,7 @@ protected:
HttpService * mService; // Simple reference, not owner
active_set_t mActiveOps;
int mPolicyCount;
- CURLM ** mMultiHandles;
+ CURLM ** mMultiHandles; // One handle per policy class
}; // end class HttpLibcurl
} // end namespace LLCore