-1

Currently using the ESP8266ServerSecure.h library , HelloServerBearSSL example.

What does this mean? Is the output server.send being initialize as an array? I'm really confused.

server.on("/inline", [](){ server.send(200, "text/plain" , "this works as well"); } );
user93228
  • 3
  • 2

1 Answers1

4

This is a lambda: https://en.cppreference.com/w/cpp/language/lambda

Equivalent of:

struct Callback
{
  void operator()() {
    server.send(200, "text/plain" , "this works as well");
  }
};

server.on("/inline", Callback{});
erenon
  • 18,838
  • 2
  • 61
  • 93