LLIOHTTPServer Class Reference

#include <lliohttpserver.h>

List of all members.

Public Types

typedef void(* timing_callback_t )(const char *hashed_name, F32 time, void *data)

Static Public Member Functions

static LLHTTPNodecreate (apr_pool_t *pool, LLPumpIO &pump, U16 port)
static void createPipe (LLPumpIO::chain_t &chain, const LLHTTPNode &root, const LLSD &ctx)
static void setTimingCallback (timing_callback_t callback, void *data)


Detailed Description

Definition at line 42 of file lliohttpserver.h.


Member Typedef Documentation

typedef void(* LLIOHTTPServer::timing_callback_t)(const char *hashed_name, F32 time, void *data)


Member Function Documentation

LLHTTPNode & LLIOHTTPServer::create ( apr_pool_t pool,
LLPumpIO pump,
U16  port 
) [static]

Creates an HTTP wire server on the pump for the given TCP port.

Returns the root node of the new server. Add LLHTTPNode instances to this root.

Nodes that return NULL for getProtocolHandler(), will use the default handler that interprets HTTP on the wire and converts it into calls to get(), put(), post(), del() with appropriate LLSD arguments and results.

To have nodes that implement some other wire protocol (XML-RPC for example), use the helper templates below.

Definition at line 877 of file lliohttpserver.cpp.

References LLPumpIO::addChain(), LLSocket::create(), LLHTTPResponseFactory::getRootNode(), llerrs, NEVER_CHAIN_EXPIRY_SECS, and LLSocket::STREAM_TCP.

Referenced by tut::HTTPClientTestData::setupTheServer().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLIOHTTPServer::createPipe ( LLPumpIO::chain_t chain,
const LLHTTPNode root,
const LLSD ctx 
) [static]

Create a pipe on the chain that handles HTTP requests. The requests are served by the node tree given at root.

This is primarily useful for unit testing.

Definition at line 853 of file lliohttpserver.cpp.

Referenced by LLHTTPResponseFactory::build(), and tut::HTTPServiceTestData::makeRequest().

Here is the caller graph for this function:

void LLIOHTTPServer::setTimingCallback ( timing_callback_t  callback,
void *  data 
) [static]

Register a callback function that will be called every time a GET, PUT, POST, or DELETE is handled.

This is used to time the LLHTTPNode handler code, which often hits the database or does other, slow operations. JC

Definition at line 902 of file lliohttpserver.cpp.

References sTimingCallback, and sTimingCallbackData.


The documentation for this class was generated from the following files:

Generated on Fri May 16 08:50:41 2008 for SecondLife by  doxygen 1.5.5