# DEVICE (HOST) – PSEUDO-CODE httpd_init(8081); while (1) { # Manage a request if ($client.request) { # Parse and validate, if invalid client.send('ERR'); # If 'set something': set variables; client.send('OK'); # Elsif a ‘request something': return client(short_string); # clear/cleanup//connection done } # Main program – do things … # Be nice my_sleep(250); }