I'm trying to make a multi port web server, but I have a little trouble with it.
Here is my issue:
I don't know how to pass data to the:
server.on("/", handleRoot);
I would like to do like this:
server.on("/", handleRoot(false));
serverExt.on("/", handleRoot(true));
void handleRoot(boolean blIsExtAccess)
{
String stData = "Hello there";
if (blIsExtAccess == false)
{
server.send(200, "text/html", stData);
} else {
serverExt.send(200, "text/html", stData);
}
}
But for some reason I'm getting compile error: "invalid use of void expression"
Can some help me with it?
Kind regards,
Viktor