This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
esp-firewall/ESPFirewall/lib/Firewall/src/Firewall.hpp

35 lines
828 B
C++
Raw Normal View History

2022-04-24 00:13:20 +02:00
#ifndef FIREWALL_HPP
#define FIREWALL_HPP
#include "API.hpp"
namespace fw
{
class Firewall : public API
{
private:
public:
2022-05-02 17:22:04 +02:00
Firewall(const char *, const char *, const char *, const char *, const String ip, const uint16_t = 8080);
2022-04-24 00:13:20 +02:00
~Firewall();
void handle_api_client();
bool check_client(WiFiClient);
2022-04-24 00:13:20 +02:00
};
2022-05-02 17:22:04 +02:00
Firewall::Firewall(const char *cert, const char *key, const char *username, const char *password, const String ip, const uint16_t port)
: API(cert, key, username, password, ip, port) {}
2022-04-24 00:13:20 +02:00
Firewall::~Firewall() {}
void Firewall::handle_api_client()
{
handle_client();
}
bool Firewall::check_client(WiFiClient client)
{
if (client.remoteIP())
return false;
else
return true;
}
2022-04-24 00:13:20 +02:00
}
#endif