xx HTTPD

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

11encryptionxscheme 10Scope: privatex01  KEYWORD

11Description: How the password is encrypted

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

11

11hunt  10Scope: privatex01  BOOLEAN

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

11                  10  x01  Default: yes

11

11password  10Scope: privatex01  STRING

11Description: The password for Cactus Control

11 Range 10 x01 Default: anon
11.*  10Any password

11

11pause  10Scope: privatex01  BOOLEAN

11Description: Pause ?

11                  10  x01  Default: no

11

11port  10Scope: privatex01  INT

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

11 Range 10 x01 Default: 5555
111:65535  10Any valid port

11

11providexpages  10Scope: privatex01  BOOLEAN

11Description: Should the server provide any pages ?

11                  10  x01  Default: yes

11

11queuexlength  10Scope: privatex01  INT

11Description: Listen queue length

11 Range 10 x01 Default: 4
111:  10Any positive number

11

11refreshxseconds  10Scope: privatex01  INT

11Description: Page refresh time seconds

11 Range 10 x01 Default: -1
11-1:  10-1 for no refresh, 0 for immediate refresh

11

11singlexstep  10Scope: privatex01  BOOLEAN

11Description: Do one step then pause ?

11                  10  x01  Default: no

11

11steeringxfrequency 10Scope: privatex01  INT

11Description: How many iterations between steering events

11 Range 10 x01 Default: 1
110:  10Any number, 0 means don’t steer

11

11terminate  10Scope: privatex01  BOOLEAN

11Description: Kill the simulation ?

11                  10  x01  Default: no

11timeoutxseconds 10Scope: privatex01  INT

11Description: Polling timeout seconds

11 Range 10 x01 Default: (none)
110:  10Any whole number

11

11timeoutxuseconds 10Scope: privatex01  INT

11Description: Polling timeout micro-seconds

11 Range 10 x01 Default: (none)
110:  10Any whole number

11

11untilxexpression  10Scope: privatex01  STRING

11Description: Pause if this expression evaluates to true.

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

11

11untilxexpressionxactive 10Scope: privatex01  BOOLEAN

11Description: Use untilxexpression parameter ?

11                  10  x01  Default: no

11

11untilxit  10Scope: privatex01  INT

11Description: Pause at this iteration

11 Range 10 x01 Default: (none)
11:  10Any iteration

11

11untilxitxactive  10Scope: privatex01  BOOLEAN

11Description: Use untilxit parameter ?

11                  10  x01  Default: no

11

11untilxtime  10Scope: privatex01  REAL

11Description: Pause after this simulation time

11 Range 10 x01 Default: (none)
11:  10Any time

11

11untilxtimexactive 10Scope: privatex01  BOOLEAN

11Description: Use untilxtime parameter ?

11                  10  x01  Default: no

11

11usexpthreads  10Scope: privatex01  BOOLEAN

11Description: Use a threaded implementation if possible ?

11                  10  x01  Default: yes

11

11user  10Scope: privatex01  STRING

11Description: The username for Cactus Control

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

11

11verbose  10Scope: privatex01  BOOLEAN

11Description: Print information about HTTP requests

11                  10  x01  Default: no

11

11cctkxfinalxtime  10Scope: shared from CACTUSx01REAL

11cctkxinitialxtime 10Scope: shared from CACTUSx01REAL

11

11cctkxitlast  10Scope: shared from CACTUSx01INT

11

7 Interfaces

General Implements: httpd

Inherits: socket

Adds header: Auth.h to httpxAuth.h Cookies.h to httpxCookies.h Steer.h to httpxSteer.h Content.h to httpxContent.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

CCTKxSTARTUP x httpxstartup x http daemon startup group x

11x11Options:11global
11 x 11Type: 11group

11

HTTPxStartup x httpxstartserver x start http server x

11x11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

11

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

11x11After:11httpxstartserver
11 x 11Type:11group

11

HTTPxStartup x httpxfirstserv x serve first pages at startup x

11x11After: 11httpxsetuppages
11 x 11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

11

CCTKxPOSTSTEP x httpxwork x working routine

11x11Before: 11ioutilxupdateparfile
11 x 11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

11

CCTKxPOSTSTEP (conditional) x httpxcontentwork x content working routine x

11x11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

11

CCTKxSHUTDOWN x httpxshutdown x http daemon shutdown x

11x11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function