ESPHome  2024.11.1
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
esphome::web_server_idf::AsyncWebServer Class Reference

#include <web_server_idf.h>

Public Member Functions

 AsyncWebServer (uint16_t port)
 
 ~AsyncWebServer ()
 
void onNotFound (std::function< void(AsyncWebServerRequest *request)> fn)
 
void begin ()
 
void end ()
 
AsyncWebHandleraddHandler (AsyncWebHandler *handler)
 

Protected Member Functions

esp_err_t request_handler_ (AsyncWebServerRequest *request) const
 

Static Protected Member Functions

static esp_err_t request_handler (httpd_req_t *r)
 
static esp_err_t request_post_handler (httpd_req_t *r)
 

Protected Attributes

uint16_t port_ {}
 
httpd_handle_t server_ {}
 
std::vector< AsyncWebHandler * > handlers_
 
std::function< void(AsyncWebServerRequest *request)> on_not_found_ {}
 

Detailed Description

Definition at line 174 of file web_server_idf.h.

Constructor & Destructor Documentation

◆ AsyncWebServer()

esphome::web_server_idf::AsyncWebServer::AsyncWebServer ( uint16_t  port)
inline

Definition at line 176 of file web_server_idf.h.

◆ ~AsyncWebServer()

esphome::web_server_idf::AsyncWebServer::~AsyncWebServer ( )
inline

Definition at line 177 of file web_server_idf.h.

Member Function Documentation

◆ addHandler()

AsyncWebHandler& esphome::web_server_idf::AsyncWebServer::addHandler ( AsyncWebHandler handler)
inline

Definition at line 186 of file web_server_idf.h.

◆ begin()

void esphome::web_server_idf::AsyncWebServer::begin ( )

Definition at line 32 of file web_server_idf.cpp.

◆ end()

void esphome::web_server_idf::AsyncWebServer::end ( )

Definition at line 25 of file web_server_idf.cpp.

◆ onNotFound()

void esphome::web_server_idf::AsyncWebServer::onNotFound ( std::function< void(AsyncWebServerRequest *request)>  fn)
inline

Definition at line 180 of file web_server_idf.h.

◆ request_handler()

esp_err_t esphome::web_server_idf::AsyncWebServer::request_handler ( httpd_req_t *  r)
staticprotected

Definition at line 105 of file web_server_idf.cpp.

◆ request_handler_()

esp_err_t esphome::web_server_idf::AsyncWebServer::request_handler_ ( AsyncWebServerRequest request) const
protected

Definition at line 111 of file web_server_idf.cpp.

◆ request_post_handler()

esp_err_t esphome::web_server_idf::AsyncWebServer::request_post_handler ( httpd_req_t *  r)
staticprotected

Definition at line 66 of file web_server_idf.cpp.

Field Documentation

◆ handlers_

std::vector<AsyncWebHandler *> esphome::web_server_idf::AsyncWebServer::handlers_
protected

Definition at line 197 of file web_server_idf.h.

◆ on_not_found_

std::function<void(AsyncWebServerRequest *request)> esphome::web_server_idf::AsyncWebServer::on_not_found_ {}
protected

Definition at line 198 of file web_server_idf.h.

◆ port_

uint16_t esphome::web_server_idf::AsyncWebServer::port_ {}
protected

Definition at line 192 of file web_server_idf.h.

◆ server_

httpd_handle_t esphome::web_server_idf::AsyncWebServer::server_ {}
protected

Definition at line 193 of file web_server_idf.h.


The documentation for this class was generated from the following files: