Use esp32_firewall_api as package
This commit is contained in:
parent
28a0753d3a
commit
929aaf39a3
7 changed files with 28 additions and 22 deletions
|
@ -2,10 +2,10 @@
|
|||
|
||||
namespace fw
|
||||
{
|
||||
API::API(fw::Firewall *firewall, const char *cert, const char *key, const char *username, const char *password, const uint16_t port)
|
||||
API::API(fw::Firewall *firewall, const char *cert, const char *key, const char *username, const char *password, const String ip, const uint16_t port)
|
||||
{
|
||||
this->firewall = firewall;
|
||||
this->api_ip = WiFi.localIP().toString();
|
||||
this->api_ip = ip;
|
||||
this->api_port = port;
|
||||
if (this->setup_auth(username, password) == ERROR)
|
||||
endless_loop();
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace fw
|
|||
class API
|
||||
{
|
||||
public:
|
||||
API(Firewall *, const char *cert, const char *key, const char *username, const char *password, const uint16_t port = 8080);
|
||||
API(Firewall *, const char *cert, const char *key, const char *username, const char *password, const String ip, const uint16_t port = 8080);
|
||||
~API();
|
||||
void handle_client();
|
||||
|
||||
|
|
Reference in a new issue