Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

httphandler.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "bits_n_bytes.h"
#include "url.h"
#include "httphandler.h"

Functions

aw_httphandler_t * aw_create_httphandler (const byte_t *url, const aw_httphandler_cevents_t *cevents, const aw_timestamp_t timeout, u_int32_t nregexs, const aw_httphandler_regex_t *regexs, const byte_t *mirror_filename, const aw_event_sig_t *mirror_updated, int32_t(*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), int32_t(*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), const aw_alarm_sched_t *sched, aw_logger_t *logger)
 Create a http handler.

void aw_free_httphandler (aw_httphandler_t *h)
 Free handler and all associated resources.

aw_handler_t * aw_wire_httphandler (aw_wire_mkhandler_args_t *args)
 Create a http handler using "wire". See header doc for keyword documentation.


Function Documentation

aw_httphandler_t* aw_create_httphandler (  const byte_t *  url,
const aw_httphandler_cevents_t *  cevents,
const aw_timestamp_t  timeout,
u_int32_t  nregexs,
const aw_httphandler_regex_t *  regexs,
const byte_t *  mirror_filename,
const aw_event_sig_t *  mirror_updated,
int32_t(*  regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
int32_t(*  regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
const aw_alarm_sched_t *  sched,
aw_logger_t *  logger
) 
 

Create a http handler.

aw_create_httphandler

Parameters:
url Url to GET
cevents Events to generate connect/noconnect
timeout Max time to connect()
nregexs How many regex strings
regexs Array of regex strings/events
mirror_filename If not NULL, put contents of GET into file
mirror_updated Event to generate when mirror is updated, may be NULL
regevent Function pointer for event registration
regmaskevent Function pointer for event mask registration
sched Run schedule
logger Logger object
Returns:
Handler object

void aw_free_httphandler (  aw_httphandler_t *  p  ) 
 

Free handler and all associated resources.

aw_free_httphandler

Parameters:
p The handler

aw_handler_t* aw_wire_httphandler (  aw_wire_mkhandler_args_t *  args  ) 
 

Create a http handler using "wire". See header doc for keyword documentation.

aw_wire_httphandler

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)