OmWebServer

Superclass:
Declared In:

Introduction

Manages wifi connection, and forwarding http requests to a handler, typically OmWebPages



Member Functions

addWifi

add to the list of known networks to try.

clearWifis

reset the list of known networks to try, to empty again.

getBonjourName

get the current bonjour name

glitch

simulate a network trouble. 1==disconnect the wifi

isWifiConnected

is it?

setAccessPoint
setBonjourName

advertises on local network as bonjourName.local

setHandler

Introduce an OmWebPages to the server, done and done!

setNtp

Introduce an NTP object to the server

setPort

defaults to 80

setStatusCallback

receive notifications of changes to wifi status

setStatusLedPin

changes or disables the blinking status LED. Use -1 to disable.

setVerbose

OmWebServer by default prints much status to serial; set to 0 to cut that out.

tick

You must call this in loop() to give time to run. This allows networks to be joined and rejoined, and is when requests are served. Call it often!

uptimeMillis

arduino's millis() will overflow after 50 days. Not this baby.


addWifi


add to the list of known networks to try.

public

void addWifi( String ssid, String password);

clearWifis


reset the list of known networks to try, to empty again.

public

void clearWifis();

getBonjourName


get the current bonjour name

public

String getBonjourName();

glitch


simulate a network trouble. 1==disconnect the wifi

public

void glitch( int k);

isWifiConnected


is it?

public

bool isWifiConnected();

setAccessPoint


public

void setAccessPoint( String ssid, String password);
Discussion

must be set before begin(), and cannot be revoked. Creates a wifi network access point with the name shown. You'll have to communicate the IP address to the user by your own means, on screen display or something. set "" for no access point. NOTE: 2019-12-14 works sometimes. I dont highly recommend. :(


setBonjourName


advertises on local network as bonjourName.local

public

void setBonjourName( String bonjourName);

setHandler


Introduce an OmWebPages to the server, done and done!

public

void setHandler( OmWebPages &requestHandler);

setNtp


Introduce an NTP object to the server

public

void setNtp( OmNtp *ntp);

setPort


defaults to 80

public

void setPort( int port);

setStatusCallback


receive notifications of changes to wifi status

public

void setStatusCallback( OmConnectionStatus statusCallback);

setStatusLedPin


changes or disables the blinking status LED. Use -1 to disable.

public

void setStatusLedPin( int statusLedPin);

setVerbose


OmWebServer by default prints much status to serial; set to 0 to cut that out.

public

void setVerbose( int verbose);

tick


You must call this in loop() to give time to run. This allows networks to be joined and rejoined, and is when requests are served. Call it often!

public

void tick();

uptimeMillis


arduino's millis() will overflow after 50 days. Not this baby.

public

long long uptimeMillis();