mirror of
https://github.com/esphome/esphome.git
synced 2025-09-29 16:42:19 +01:00
simple
This commit is contained in:
@@ -83,12 +83,9 @@ void DNSServer::stop() {
|
||||
|
||||
void DNSServer::process_next_request() {
|
||||
// Process one request if socket is valid and data is available
|
||||
if (this->socket_ != nullptr && this->socket_->ready()) {
|
||||
this->process_dns_request();
|
||||
if (this->socket_ == nullptr || !this->socket_->ready()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void DNSServer::process_dns_request() {
|
||||
struct sockaddr_in client_addr;
|
||||
socklen_t client_addr_len = sizeof(client_addr);
|
||||
|
||||
|
@@ -17,8 +17,6 @@ class DNSServer {
|
||||
protected:
|
||||
static constexpr size_t DNS_BUFFER_SIZE = 192;
|
||||
|
||||
void process_dns_request();
|
||||
|
||||
std::unique_ptr<socket::Socket> socket_{nullptr};
|
||||
network::IPAddress server_ip_;
|
||||
uint8_t buffer_[DNS_BUFFER_SIZE];
|
||||
|
Reference in New Issue
Block a user