Skip to content

Program Flow

bgailer edited this page Jul 7, 2018 · 6 revisions

UNDER CONSTRUCTION!!

Upon start the server waits for connections, which can be triggered by HTTP or WS requests.

For each connection the server starts the program specified in the websocketd command. If --staticdir is specified it will also return the file specified in the request. If file is not specified, will return index.html, if present.

The static file is returned first, then the program is run.

There seems to be a problem with the setting of some environment variables. Case in point: QUERY_STRING is always blank. A workaround is: in the web page javascript include ws.send(document.URL) where ws refers to a WebSocket instance.

Clone this wiki locally