aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmessage/lliohttpserver.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llmessage/lliohttpserver.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/linden/indra/llmessage/lliohttpserver.h b/linden/indra/llmessage/lliohttpserver.h
index 64dce63..8a6c8d4 100644
--- a/linden/indra/llmessage/lliohttpserver.h
+++ b/linden/indra/llmessage/lliohttpserver.h
@@ -36,7 +36,12 @@
36 36
37class LLPumpIO; 37class LLPumpIO;
38 38
39LLHTTPNode& LLCreateHTTPServer(apr_pool_t* pool, LLPumpIO& pump, U16 port); 39class LLIOHTTPServer
40{
41public:
42 typedef void (*timing_callback_t)(const char* hashed_name, F32 time, void* data);
43
44 static LLHTTPNode& create(apr_pool_t* pool, LLPumpIO& pump, U16 port);
40 /**< Creates an HTTP wire server on the pump for the given TCP port. 45 /**< Creates an HTTP wire server on the pump for the given TCP port.
41 * 46 *
42 * Returns the root node of the new server. Add LLHTTPNode instances 47 * Returns the root node of the new server. Add LLHTTPNode instances
@@ -51,14 +56,23 @@ LLHTTPNode& LLCreateHTTPServer(apr_pool_t* pool, LLPumpIO& pump, U16 port);
51 * for example), use the helper templates below. 56 * for example), use the helper templates below.
52 */ 57 */
53 58
54void LLCreateHTTPPipe(LLPumpIO::chain_t& chain, 59 static void createPipe(LLPumpIO::chain_t& chain,
55 const LLHTTPNode& root, const LLSD& ctx); 60 const LLHTTPNode& root, const LLSD& ctx);
56 /**< Create a pipe on the chain that handles HTTP requests. 61 /**< Create a pipe on the chain that handles HTTP requests.
57 * The requests are served by the node tree given at root. 62 * The requests are served by the node tree given at root.
58 * 63 *
59 * This is primarily useful for unit testing. 64 * This is primarily useful for unit testing.
60 */ 65 */
61 66
67 static void setTimingCallback(timing_callback_t callback, void* data);
68 /**< Register a callback function that will be called every time
69 * a GET, PUT, POST, or DELETE is handled.
70 *
71 * This is used to time the LLHTTPNode handler code, which often hits
72 * the database or does other, slow operations. JC
73 */
74};
75
62/* @name Helper Templates 76/* @name Helper Templates
63 * 77 *
64 * These templates make it easy to create nodes that use thier own protocol 78 * These templates make it easy to create nodes that use thier own protocol