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)

Definition at line 45 of file lliohttpserver.h.

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 875 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().

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 851 of file lliohttpserver.cpp.

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

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 900 of file lliohttpserver.cpp.

References sTimingCallback, and sTimingCallbackData.

The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:26 2010 for Second Life Viewer by  doxygen 1.4.7