WebServer offers a basic HTTP service. It parses and dispatches incoming requests and sends the corresponding replies.
INTERFACEWebServer ; IMPORT Node; PROCEDURE RegisterRoot (tag: TEXT; root: Node.T);
Registersroot
as the initial node for any URL that begins withtag
. Iftag
isNIL
,r
is the initial node any URL that doesn't match any of the registered tags. It is a checked runtime error to register more than one root for a tag.
PROCEDURE UnregisterRoot (tag: TEXT);
Remove the root named tag
from the table of registered roots
PROCEDURE Run ();
Open the TCP channels and begin offering service. Run
returns when
it is no longer able to offer service.
PROCEDURE Restart ();
Start a new server using the current communication configuration
END WebServer.