HTTPD


Abstract

1 Introduction

2 Physical System

3 Numerical Implementation

4 Using This Thorn

4.1 Obtaining This Thorn

4.2 Basic Usage

4.3 Special Behaviour

4.4 Interaction With Other Thorns

4.5 Support and Feedback

5 History

5.1 Thorn Source Code

5.2 Thorn Documentation

5.3 Acknowledgements

References

6 Parameters




encryption_scheme
Scope: private KEYWORD



Description: How the password is encrypted



Range Default: none
none
Not encrypted
crypt
crypt(3) (standard UNIX passwd format)






hunt
Scope: private BOOLEAN



Description: Should the server hunt for a port if the specified one is taken ?



Default: yes






password
Scope: private STRING



Description: The password for Cactus Control



Range Default: anon
.*
Any password






pause
Scope: private BOOLEAN



Description: Pause ?



Default: no






port
Scope: private INT



Description: HTTP port number to use (can be overridden by shell variable HTTPD_PORT)



Range Default: 5555
1:65535
Any valid port






provide_pages
Scope: private BOOLEAN



Description: Should the server provide any pages ?



Default: yes






queue_length
Scope: private INT



Description: Listen queue length



Range Default: 4
1:
Any positive number






refresh_seconds
Scope: private INT



Description: Page refresh time seconds



Range Default: -1
-1:
-1 for no refresh, 0 for immediate refresh






single_step
Scope: private BOOLEAN



Description: Do one step then pause ?



Default: no






steering_frequency
Scope: private INT



Description: How many iterations between steering events



Range Default: 1
0:
Any number, 0 means don’t steer






terminate
Scope: private BOOLEAN



Description: Kill the simulation ?



Default: no






timeout_seconds
Scope: private INT



Description: Polling timeout seconds



Range Default: (none)
0:
Any whole number






timeout_useconds
Scope: private INT



Description: Polling timeout micro-seconds



Range Default: (none)
0:
Any whole number






until_expression
Scope: private STRING



Description: Pause if this expression evaluates to true.



Range Default: iteration+40 < time*100
.*
Any expression






until_expression_active
Scope: private BOOLEAN



Description: Use until_expression parameter ?



Default: no






until_it
Scope: private INT



Description: Pause at this iteration



Range Default: (none)
:
Any iteration






until_it_active
Scope: private BOOLEAN



Description: Use until_it parameter ?



Default: no






until_time
Scope: private REAL



Description: Pause after this simulation time



Range Default: (none)
:
Any time






until_time_active
Scope: private BOOLEAN



Description: Use until_time parameter ?



Default: no






use_pthreads
Scope: private BOOLEAN



Description: Use a threaded implementation if possible ?



Default: yes






user
Scope: private STRING



Description: The username for Cactus Control



Range Default: anon
.+
Any name of one or more characters






verbose
Scope: private BOOLEAN



Description: Print information about HTTP requests



Default: no






cctk_final_time
Scope: shared from CACTUSREAL






cctk_initial_time
Scope: shared from CACTUSREAL






cctk_itlast
Scope: shared from CACTUSINT



7 Interfaces

General

Implements:

httpd

Inherits:

socket

Adds header:

Auth.h to http_Auth.h

Cookies.h to http_Cookies.h

Steer.h to http_Steer.h

Content.h to http_Content.h

Uses header:

SocketUtils.h

8 Schedule

This section lists all the variables which are assigned storage by thorn CactusConnect/HTTPD. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.

Storage

NONE

Scheduled Functions

CCTK_STARTUP

  http_startup

  http daemon startup group

 

  Options: global
  Type: group

HTTP_Startup

  http_startserver

  start http server

 

  Language: c
  Options: global
  Type: function

HTTP_Startup

  http_setuppages

  group to setup stuff which needs to be done between starting the server and the first time it serves pages

 

  After: http_startserver
  Type: group

HTTP_Startup

  http_firstserv

  serve first pages at startup

 

  After: http_setuppages
  Language: c
  Options: global
  Type: function

CCTK_POSTSTEP

  http_work

  working routine

 

  Before: ioutil_updateparfile
  Language: c
  Options: global
  Type: function

CCTK_POSTSTEP (conditional)

  http_contentwork

  content working routine

 

  Language: c
  Options: global
  Type: function

CCTK_SHUTDOWN

  http_shutdown

  http daemon shutdown

 

  Language: c
  Options: global
  Type: function